So I changed the code a bit. Loading NPDTstruct12 now is just done into a temporary variable and then converted to NPDTstruct52. There reverse is done when saving (creating a temporary NPDTstruct12 to save based on the NPDTstruct52 object). This fixed all the uninitialized variables.
However, when unchecking "Auto Calc" we really should perform one round of auto calc to generate all values. There is some code here
that could be adapted for that. I am however failing to understand where one would put that. Here
is an option, but I get the distinct feeling this is intended for load/save, and not much more.
There is also the issue of where to initiate the auto calc from. Here
is the only place I've found so far, but again, I don't get the feeling this is the right place to do it. Nor have I gotten at good understanding of how the event system is built up. I saw dataChanged is emitted somewhere, so I suppose some class could listen for that, but where would be an ideal place?