diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index b699f3eaaffd57646ff012aee31284bc04035844..cb45863cae05640fe98ce2a83644f3983aeb3506 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 2a7f463f95da7b05b1dc377a6a79aab15267d5a0..9068876b73cb48d05c41444df0a445f45233294d 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)