From 5b74ee1f29c49bf7b71d011c803299d948818383 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sun, 17 Dec 2023 16:03:39 +0000 Subject: [PATCH] fitresult: reset displayed ranges only if there is something to reset (#184) closes #156 Co-authored-by: Dominik Demuth Reviewed-on: https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval/pulls/184 --- src/gui_qt/fit/result.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/fit/result.py b/src/gui_qt/fit/result.py index 4ad9e48..7c4b85c 100644 --- a/src/gui_qt/fit/result.py +++ b/src/gui_qt/fit/result.py @@ -157,7 +157,8 @@ class QFitResult(QtWidgets.QDialog, Ui_Dialog): def reset_fit_ranges(self): for i in range(self.sets_comboBox.count()): graph_id = self.sets_comboBox.itemData(i) - self.graph_opts.pop(graph_id) + if graph_id in self.graph_opts: + self.graph_opts.pop(graph_id) self.fit_plot.enableAutoRange()