From 0251dea5637c372c7ee8cc79514e8ce0e66d1ee9 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 12 Apr 2023 17:28:12 +0200 Subject: [PATCH] uncheck fits in data_table --- src/gui_qt/fit/fitwindow.py | 7 +++++++ src/gui_qt/main/management.py | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gui_qt/fit/fitwindow.py b/src/gui_qt/fit/fitwindow.py index 60ea5b2..f258dda 100644 --- a/src/gui_qt/fit/fitwindow.py +++ b/src/gui_qt/fit/fitwindow.py @@ -148,6 +148,13 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog): Add name and id of dataset to list. """ self.data_table.load(ids) + + # deselect all fit sets + for i in range(self.data_table.rowCount()): + data_id = self.data_table.item(i, 0).data(QtCore.Qt.UserRole+1) + if self._management[data_id].mode == 'fit': + self.data_table.item(i, 0).setCheckState(QtCore.Qt.Unchecked) + if self.models: for m in self.models.keys(): self.data_table.add_model(m) diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index 1c7000b..c8c21e1 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -605,6 +605,7 @@ class UpperManagement(QtCore.QObject): if not graph_id: graph_id = '' + # TODO add flag that new window will not get focus, because it messes up the data_table in fitwindow self.newData.emit(p_id_list, graph_id) def save_fit_parameter(self, fname: str | pathlib.Path, fit_sets: list[str] = None):