瀏覽代碼

wxGUI/iclass: better cleanup handling - https://trac.osgeo.org/grass/ticket/2482

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62696 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 年之前
父節點
當前提交
de81cd349d
共有 1 個文件被更改,包括 3 次插入2 次删除
  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)