[GRASS-SVN] r59517 - grass/trunk/gui/wxpython/animation

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 29 21:30:58 PDT 2014


Author: annakrat
Date: 2014-03-29 21:30:58 -0700 (Sat, 29 Mar 2014)
New Revision: 59517

Modified:
   grass/trunk/gui/wxpython/animation/frame.py
Log:
wxGUI/animation: fix closing window when animation is running

Modified: grass/trunk/gui/wxpython/animation/frame.py
===================================================================
--- grass/trunk/gui/wxpython/animation/frame.py	2014-03-29 22:57:01 UTC (rev 59516)
+++ grass/trunk/gui/wxpython/animation/frame.py	2014-03-30 04:30:58 UTC (rev 59517)
@@ -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