[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-commit
Subject:    [GRASS-SVN] r59517 - grass/trunk/gui/wxpython/animation
From:       svn_grass () osgeo ! org
Date:       2014-03-30 4:30:58
Message-ID: 20140330043059.25436390405 () trac ! osgeo ! org
[Download RAW message or body]

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()

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic