[GRASS-SVN] r59518 - grass/branches/releasebranch_7_0/gui/wxpython/animation

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 29 21:33:07 PDT 2014


Author: annakrat
Date: 2014-03-29 21:33:07 -0700 (Sat, 29 Mar 2014)
New Revision: 59518

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/animation/frame.py
Log:
wxGUI/animation: fix closing window when animation is running (merged from trunk, r59517)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/animation/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/animation/frame.py	2014-03-30 04:30:58 UTC (rev 59517)
+++ grass/branches/releasebranch_7_0/gui/wxpython/animation/frame.py	2014-03-30 04:33:07 UTC (rev 59518)
@@ -309,10 +309,13 @@
                    entry='wxGUI.animation')
 
     def OnCloseWindow(self, event):
+        if self.controller.timer.IsRunning():
+                self.controller.timer.Stop()
         CleanUp(TMP_DIR)()
         self.Destroy()
 
     def __del__(self):
+        """!It might not be called, therefore we try to clean it all in OnCloseWindow."""
         if hasattr(self, 'controller') and hasattr(self.controller, 'timer'):
             if self.controller.timer.IsRunning():
                 self.controller.timer.Stop()



More information about the grass-commit mailing list