minor fixes

This commit is contained in:
Dominik Demuth
2023-09-19 11:33:52 +02:00
parent 8d994bb9b4
commit 41d90bb15f
3 changed files with 15 additions and 19 deletions

View File

@ -118,6 +118,7 @@ class FitModelWidget(QtWidgets.QWidget, Ui_FitParameter):
is_text = False
except ValueError:
is_text = True
self.global_checkbox.setCheckState(False)
self.set_fixed(is_text)

View File

@ -237,13 +237,13 @@ class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit):
for i, (p_i, g) in enumerate(zip(parameter, self.global_parameter)):
if isinstance(g, FitModelWidget):
if (p_i is None) and (not is_global[i]):
if (p_i is None) or is_global[i]:
# set has no oen value
p.append(param_general[i].copy())
else:
lb, ub = bds[i]
try:
if not (lb < p[i] < ub):
if not (lb < p_i < ub):
raise ValueError(f'Parameter {g.name} is outside bounds ({lb}, {ub})')
except TypeError:
pass