[GRASS-SVN] r70594 - grass/trunk/gui/wxpython/timeline

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 15 19:02:38 PST 2017


Author: annakrat
Date: 2017-02-15 19:02:38 -0800 (Wed, 15 Feb 2017)
New Revision: 70594

Modified:
   grass/trunk/gui/wxpython/timeline/frame.py
Log:
g.gui.timeline: destructor is not called for some reason, db connection must be closed on close event

Modified: grass/trunk/gui/wxpython/timeline/frame.py
===================================================================
--- grass/trunk/gui/wxpython/timeline/frame.py	2017-02-15 22:41:23 UTC (rev 70593)
+++ grass/trunk/gui/wxpython/timeline/frame.py	2017-02-16 03:02:38 UTC (rev 70594)
@@ -85,14 +85,16 @@
         # 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 __del__(self):
+    def OnClose(self, event):
         """Close the database interface and stop the messenger and C-interface
            subprocesses.
         """
         if self.dbif.connected is True:
             self.dbif.close()
         tgis.stop_subprocesses()
+        self.Destroy()
 
     def _layout(self):
         """Creates the main panel with all the controls on it:



More information about the grass-commit mailing list