From 3a2b4d0402c2817c919c6ea825f8f71861a9e405 Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:42:28 +0200 Subject: [PATCH] wxGUI/iclass: fix closing scatter plot pane via x button (#3172) --- gui/wxpython/iscatt/frame.py | 1 + gui/wxpython/iscatt/plots.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/wxpython/iscatt/frame.py b/gui/wxpython/iscatt/frame.py index 44d555aa18c..242731ef182 100644 --- a/gui/wxpython/iscatt/frame.py +++ b/gui/wxpython/iscatt/frame.py @@ -276,6 +276,7 @@ def ScatterPlotClosed(self, scatt_id): del self.scatts[scatt_id] if pane.IsOk(): + pane.DestroyOnClose() self._mgr.ClosePane(pane) self._mgr.Update() diff --git a/gui/wxpython/iscatt/plots.py b/gui/wxpython/iscatt/plots.py index ef232a5fbd7..aabb4e4e4f3 100644 --- a/gui/wxpython/iscatt/plots.py +++ b/gui/wxpython/iscatt/plots.py @@ -314,7 +314,6 @@ def CallAfter(self, funcs_list): def CleanUp(self): self.plotClosed.emit(scatt_id=self.scatt_id) - self.Destroy() def ZoomWheel(self, event): # get the current x and y limits