bugfix (#193)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m32s

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: #193
This commit is contained in:
Dominik Demuth 2023-12-30 15:40:44 +00:00
parent 24bba43b40
commit 57afee372f
2 changed files with 7 additions and 2 deletions

View File

@ -532,11 +532,14 @@ class DataTree(QtWidgets.QTreeWidget):
def uncheck_sets(self, sets: list[str]):
self.blockSignals(True)
iterator = QtWidgets.QTreeWidgetItemIterator(self)
self._checked_sets = set()
while iterator.value():
item = iterator.value()
if item is not None:
if item.data(0, QtCore.Qt.UserRole) in sets:
item.setCheckState(0, QtCore.Qt.Unchecked)
else:
self._checked_sets.add(item.data(0, QtCore.Qt.UserRole))
iterator += 1
self.blockSignals(False)

View File

@ -77,9 +77,11 @@ class FitModelWidget(QtWidgets.QWidget, Ui_FitParameter):
if bds is not None:
self.set_bounds(*bds)
self.fixed_check.setCheckState(QtCore.Qt.CheckState.Unchecked if fixed else QtCore.Qt.CheckState.Checked)
if fixed is not None:
self.fixed_check.setCheckState(QtCore.Qt.CheckState.Unchecked if fixed else QtCore.Qt.CheckState.Checked)
self.global_checkbox.setCheckState(QtCore.Qt.CheckState.Checked if glob else QtCore.Qt.CheckState.Unchecked)
if glob is not None:
self.global_checkbox.setCheckState(QtCore.Qt.CheckState.Checked if glob else QtCore.Qt.CheckState.Unchecked)
def get_parameter(self):
try: