openmc-dev / plotter

Native plotting GUI for model design and verification
MIT License
48 stars 18 forks source link

ignore `plot_settings.pkl` file if model is changed #94

Closed kkiesling closed 2 years ago

kkiesling commented 2 years ago

closes #77

If either the materials IDs or cell IDs are altered between when the GUI was last closed and when it is reopened with the plot_settings.pkl file, this will ignore the settings file (previously this would cause an error).

In order for this to work, restoreModelSettings() has to be called after the cell and material IDs have been populated in the model (ie, after the plot model is no longer "frozen").

Are there any other properties/model changes that could cause these errors that are not captured in cell IDs and mat IDs?

kkiesling commented 2 years ago

Don't merge this yet- I think moving the point at which the model settings are restored messed with some other things. If we check the whole file, then that doesn't need to be moved to the end anyway. So let me change that back.

kkiesling commented 2 years ago

Now this should be good

paulromano commented 2 years ago

Thanks @kkiesling!