From 340d5d103837ec0f2dbf1b180ba953ff0c0976ce Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 28 Nov 2023 18:31:19 +0100 Subject: [PATCH] fit results are auto-scaled if data was not fit before; related to #156 --- src/gui_qt/fit/result.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/fit/result.py b/src/gui_qt/fit/result.py index a7e77f7..4e4b51c 100644 --- a/src/gui_qt/fit/result.py +++ b/src/gui_qt/fit/result.py @@ -205,14 +205,17 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog): if idx in self.graph_opts: view_range, logx, logy = self.graph_opts[idx] - self.fit_plot.setRange(xRange=view_range[0], yRange=view_range[1], padding=0) self.fit_plot.setLogMode(x=logx, y=logy) + self.fit_plot.setRange(xRange=view_range[0], yRange=view_range[1], padding=0) self.logx_box.blockSignals(True) self.logx_box.setChecked(logx) self.logx_box.blockSignals(False) self.logy_box.blockSignals(True) self.logy_box.setChecked(logy) self.logy_box.blockSignals(False) + else: + self.fit_plot.enableAutoRange() + self.fit_plot.disableAutoRange() def set_correlation(self, idx: str): while self.corr_tableWidget.rowCount():