Skip to content
Open
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: 6 additions & 4 deletions src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3444,6 +3444,7 @@ def updatePageWithParameters(self, line_dict: dict[str, list[str]], warn_user: b
if 'model_name' not in line_dict:
return
model = line_dict['model_name'][0]
structure_factor = line_dict['fitpage_structure'][0]
context = {}

if 'multiplicity' in line_dict:
Expand All @@ -3466,7 +3467,7 @@ def updatePageWithParameters(self, line_dict: dict[str, list[str]], warn_user: b

# Create the context dictionary for parameters
# Exclude multiplicity and number of shells params from context
context = {k: v for (k, v) in line_dict.items() if len(v) > 3 and k != model}
context = {k: v for (k, v) in line_dict.items() if len(v) > 3 and k not in [model, structure_factor]}
context['model_name'] = model

if warn_user and str(self.cbModel.currentText()) != str(context['model_name']):
Expand Down Expand Up @@ -3542,9 +3543,10 @@ def updateFittedValues(row):
if param_name not in list(param_dict) or row == self._n_shells_row:
# Skip magnetic, polydisperse (.pd), and shell parameters - they are handled elsewhere
return
# checkbox state
param_checked = QtCore.Qt.Checked if param_dict[param_name][0] == "True" else QtCore.Qt.Unchecked
self._model_model.item(row, 0).setCheckState(param_checked)
# checkbox state - None means no checkbox present so don't modify
if param_dict[param_name][0] != "None":
param_checked = QtCore.Qt.Checked if param_dict[param_name][0] == "True" else QtCore.Qt.Unchecked
self._model_model.item(row, 0).setCheckState(param_checked)

# parameter value can be either just a value or text on the combobox
param_text = param_dict[param_name][1]
Expand Down
Loading