display correct start parameter

This commit is contained in:
Dominik Demuth
2023-05-19 15:48:32 +02:00
parent a1ab6335c5
commit 66a0e40a23
2 changed files with 8 additions and 13 deletions

View File

@ -77,16 +77,11 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
w.deleteLater()
del self.param_widgets[idx]
if len(self.functionwidget) == 0:
self._current_function = None
if len(self.param_widgets) == 0:
# empty model
self.newmodel_button.setEnabled(False)
self.deletemodel_button.setEnabled(False)
self._current_function = None
else:
f_tree = self.functionwidget.functree
func_idx = f_tree.currentItem().data(0, f_tree.counterRole)
self._current_function = self.functionwidget.functions[func_idx]
@QtCore.pyqtSlot(int)
def show_function_parameter(self, function_id: int, function_idx: int = None):