浏览代码

g.gui.tplot: fixed error during exit; https://trac.osgeo.org/grass/ticket/2789

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@66679 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 9 年之前
父节点
当前提交
02c296bbb4
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      gui/wxpython/tplot/frame.py

+ 6 - 0
gui/wxpython/tplot/frame.py

@@ -106,6 +106,7 @@ class TplotFrame(wx.Frame):
         # We create a database interface here to speedup the GUI
         self.dbif = tgis.SQLDatabaseInterfaceConnection()
         self.dbif.connect()
+        self.Bind(wx.EVT_CLOSE, self.onClose)
 
     def init(self):
         self.timeDataR = OrderedDict()
@@ -125,6 +126,11 @@ class TplotFrame(wx.Frame):
             self.dbif.close()
         tgis.stop_subprocesses()
 
+    def onClose(self,evt):
+        self.coorval.OnClose()
+        self.cats.OnClose()
+        self.Destroy()
+
     def _layout(self):
         """Creates the main panel with all the controls on it:
              * mpl canvas