update internal fit infos after function removal
This commit is contained in:
@ -77,8 +77,12 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
|
||||
"""
|
||||
w = self.param_widgets[idx]
|
||||
self.stackedWidget.removeWidget(w)
|
||||
w.setParent(None)
|
||||
w.deleteLater()
|
||||
del self.param_widgets[idx]
|
||||
_, func_id = self.functionwidget.get_selected()
|
||||
|
||||
self.get_functions()
|
||||
|
||||
self._current_function = None
|
||||
if len(self.param_widgets) == 0:
|
||||
@ -104,7 +108,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
|
||||
if function is None:
|
||||
return
|
||||
|
||||
dialog = QFitParameterWidget(self.stackedWidget)
|
||||
dialog = QFitParameterWidget(function_id, self.stackedWidget)
|
||||
data_names = self.data_table.data_list(include_name=True)
|
||||
|
||||
dialog.set_function(function, function_idx)
|
||||
@ -206,9 +210,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
|
||||
|
||||
for m in self.models[model_id]:
|
||||
func_id = m['cnt']
|
||||
self.stackedWidget.removeWidget(self.param_widgets[func_id])
|
||||
|
||||
self.param_widgets.pop(func_id)
|
||||
self.remove_function(func_id)
|
||||
|
||||
self._complex.pop(model_id)
|
||||
self._func_list.pop(model_id)
|
||||
|
Reference in New Issue
Block a user