[GRASS-SVN] r70604 - grass/branches/releasebranch_7_2/gui/wxpython/timeline

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 16 18:50:50 PST 2017


Author: annakrat
Date: 2017-02-16 18:50:49 -0800 (Thu, 16 Feb 2017)
New Revision: 70604

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

Modified: grass/branches/releasebranch_7_2/gui/wxpython/timeline/frame.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/timeline/frame.py	2017-02-16 20:21:37 UTC (rev 70603)
+++ grass/branches/releasebranch_7_2/gui/wxpython/timeline/frame.py	2017-02-17 02:50:49 UTC (rev 70604)
@@ -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