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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 5 06:15:28 PST 2012


Author: annakrat
Date: 2012-12-05 06:15:27 -0800 (Wed, 05 Dec 2012)
New Revision: 54204

Modified:
   grass/trunk/gui/wxpython/animation/toolbars.py
Log:
wxGUI/animation: disable tools when no animation loaded

Modified: grass/trunk/gui/wxpython/animation/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/animation/toolbars.py	2012-12-05 14:14:40 UTC (rev 54203)
+++ grass/trunk/gui/wxpython/animation/toolbars.py	2012-12-05 14:15:27 UTC (rev 54204)
@@ -80,6 +80,7 @@
         self.Realize()
 
         self.isPlayingForward = True
+        self.EnableAllTools(False)
         
         
     def _toolbarData(self):
@@ -143,8 +144,6 @@
             self.EnableTool(self.playForward, not self.isPlayingForward)
             self.EnableTool(self.playBack, self.isPlayingForward)
 
-
-
     def OnStop(self, event):
         self.Stop()
         self.parent.OnStop(event)
@@ -180,6 +179,13 @@
         self.ToggleTool(self.oneDirectionReplay, one)
         self.ToggleTool(self.bothDirectionReplay, both)
 
+    def EnableAnimTools(self, enable):
+        """!Enable or diable animation tools"""
+        self.EnableTool(self.playForward, enable)
+        self.EnableTool(self.playBack, enable)
+        self.EnableTool(self.pause, enable)
+        self.EnableTool(self.stop, enable)
+
 class MiscToolbar(BaseToolbar):
     """!Toolbar with miscellaneous tools related to app
     """



More information about the grass-commit mailing list