Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion hexrdgui/calibration/wppf_options_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,13 @@ def params_dict(self, v):
if key not in self.params:
continue

old_param = self.params[key]
self.params[key] = dict_to_param(val)

if old_param.expr:
# If there was an expression, restore that expression
self.params[key].expr = old_param.expr

def load_settings(self):
settings = HexrdConfig().config['calibration'].get('wppf')
if not settings:
Expand Down Expand Up @@ -1688,8 +1693,11 @@ def load_params(self, filename):
self.validate_import_params(import_params, filename)

# Keep the ordering the same as the GUI currently has
for key in self.params.keys():
for key, old_param in self.params.items():
self.params[key] = dict_to_param(import_params[key])
if old_param.expr:
# If there was an expression, restore that expression
self.params[key].expr = old_param.expr

self.update_tree_view()
self.save_settings()
Expand Down
Loading