diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index b699f3ea..cb45863c 100644 --- a/src/View/Results/CustomPlot/Plot.py +++ b/src/View/Results/CustomPlot/Plot.py @@ -439,7 +439,7 @@ class CustomPlot(PamhyrPlot): @timer def update(self): - #if not self._init: + if not self._init: self.draw() return diff --git a/src/View/Results/Window.py b/src/View/Results/Window.py index 2a7f463f..9068876b 100644 --- a/src/View/Results/Window.py +++ b/src/View/Results/Window.py @@ -538,6 +538,9 @@ class ResultsWindow(PamhyrWindow): ) plot.draw() + # Add plot to additional plot + self._additional_plot[name] = plot + grid.addWidget(toolbar, 0, 0) grid.addWidget(canvas, 1, 0) widget.setLayout(grid) @@ -669,4 +672,5 @@ class ResultsWindow(PamhyrWindow): def delete_tab(self, index): tab_widget = self.find(QTabWidget, f"tabWidget") + self._additional_plot.pop(tab_widget.tabText(index)) tab_widget.removeTab(index)