209-fit-tree #222

Merged
dominik merged 2 commits from 209-fit-tree into master 2024-01-21 17:01:46 +00:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 625af5ec71 - Show all commits

View File

@ -70,7 +70,7 @@ class FitModelTree(QtWidgets.QTreeWidget):
self.remove_function(item) self.remove_function(item)
elif evt.key() == QtCore.Qt.Key.Key_Space: elif evt.key() == QtCore.Qt.Key.Key_Space:
for item in self.treeWidget.selectedItems(): for item in self.selectedItems():
cs = item.checkState(0) cs = item.checkState(0)
if cs == QtCore.Qt.CheckState.Unchecked: if cs == QtCore.Qt.CheckState.Unchecked:
item.setCheckState(0, QtCore.Qt.CheckState.Checked) item.setCheckState(0, QtCore.Qt.CheckState.Checked)

View File

@ -26,6 +26,11 @@ class ModelFactory:
if func['children']: if func['children']:
right, _, _ = ModelFactory.create_from_list(func['children'], left_cnt=func['pos'], right, _, _ = ModelFactory.create_from_list(func['children'], left_cnt=func['pos'],
func_order=func_order, param_len=param_len) func_order=func_order, param_len=param_len)
if right is None:
right = func['func']
right_cnt = func['cnt']
else:
right_cnt = None right_cnt = None
right = MultiModel(func['func'], right, func['children'][0]['op'], left_idx=func['cnt'], right_idx=None) right = MultiModel(func['func'], right, func['children'][0]['op'], left_idx=func['cnt'], right_idx=None)
else: else: