From 26fea8f69fb489dc7cf430abcf20383a7d40db00 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sun, 4 Jun 2023 15:57:17 +0200 Subject: [PATCH] remove temporary elements from graphs before deletion --- src/gui_qt/main/mainwindow.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index 4a6f92a..d6bac83 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -376,10 +376,15 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): if wdgt == self.current_graph_widget: if self.ptsselectwidget.connected_figure == gid: self.ptsselectwidget.connected_figure = None + for line in self.ptsselectwidget.pts_lines: + self.current_graph_widget.remove_external(line) + self.tabWidget.removeTab(self.tabWidget.indexOf(self.ptsselectwidget)) if self.t1tauwidget.connected_figure == gid: self.t1tauwidget.connected_figure = None + self.current_graph_widget.add_external(self.t1tauwidget.min_pos) + self.current_graph_widget.add_external(self.t1tauwidget.parabola) self.tabWidget.removeTab(self.tabWidget.indexOf(self.t1tauwidget)) if self.fit_dialog.connected_figure == gid: