Explorar o código

wxGUI/iclass: better cleanup handling - https://trac.osgeo.org/grass/ticket/2482 (merge from trunk, https://trac.osgeo.org/grass/changeset/62696)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63664 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=10) %!d(string=hai) anos
pai
achega
5f1a8d1d8c
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      gui/wxpython/iclass/frame.py

+ 3 - 2
gui/wxpython/iclass/frame.py

@@ -204,10 +204,11 @@ class IClassMapFrame(DoubleMapFrame):
     def OnCloseWindow(self, event):
         self.GetFirstWindow().GetDigit().CloseMap()
         self.plotPanel.CloseWindow()
+        self._cleanup()
 
         self.Destroy()
-        
-    def __del__(self):
+
+    def _cleanup(self):
         """Frees C structs and removes vector map and all raster maps."""
         I_free_signatures(self.signatures)
         I_free_group_ref(self.refer)