forked from IPKM/nmreval
bugfix (#193)
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de> Reviewed-on: IPKM/nmreval#193
This commit is contained in:
parent
24bba43b40
commit
57afee372f
@ -532,11 +532,14 @@ class DataTree(QtWidgets.QTreeWidget):
|
|||||||
def uncheck_sets(self, sets: list[str]):
|
def uncheck_sets(self, sets: list[str]):
|
||||||
self.blockSignals(True)
|
self.blockSignals(True)
|
||||||
iterator = QtWidgets.QTreeWidgetItemIterator(self)
|
iterator = QtWidgets.QTreeWidgetItemIterator(self)
|
||||||
|
self._checked_sets = set()
|
||||||
while iterator.value():
|
while iterator.value():
|
||||||
item = iterator.value()
|
item = iterator.value()
|
||||||
if item is not None:
|
if item is not None:
|
||||||
if item.data(0, QtCore.Qt.UserRole) in sets:
|
if item.data(0, QtCore.Qt.UserRole) in sets:
|
||||||
item.setCheckState(0, QtCore.Qt.Unchecked)
|
item.setCheckState(0, QtCore.Qt.Unchecked)
|
||||||
|
else:
|
||||||
|
self._checked_sets.add(item.data(0, QtCore.Qt.UserRole))
|
||||||
iterator += 1
|
iterator += 1
|
||||||
self.blockSignals(False)
|
self.blockSignals(False)
|
||||||
|
|
||||||
|
@ -77,8 +77,10 @@ class FitModelWidget(QtWidgets.QWidget, Ui_FitParameter):
|
|||||||
if bds is not None:
|
if bds is not None:
|
||||||
self.set_bounds(*bds)
|
self.set_bounds(*bds)
|
||||||
|
|
||||||
|
if fixed is not None:
|
||||||
self.fixed_check.setCheckState(QtCore.Qt.CheckState.Unchecked if fixed else QtCore.Qt.CheckState.Checked)
|
self.fixed_check.setCheckState(QtCore.Qt.CheckState.Unchecked if fixed else QtCore.Qt.CheckState.Checked)
|
||||||
|
|
||||||
|
if glob is not None:
|
||||||
self.global_checkbox.setCheckState(QtCore.Qt.CheckState.Checked if glob else QtCore.Qt.CheckState.Unchecked)
|
self.global_checkbox.setCheckState(QtCore.Qt.CheckState.Checked if glob else QtCore.Qt.CheckState.Unchecked)
|
||||||
|
|
||||||
def get_parameter(self):
|
def get_parameter(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user