[GRASS-SVN] r50176 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 14 07:35:43 EST 2012


Author: annakrat
Date: 2012-01-14 04:35:43 -0800 (Sat, 14 Jan 2012)
New Revision: 50176

Modified:
   grass/trunk/gui/wxpython/vdigit/toolbars.py
Log:
wxGUI/wxIClass: fixed starting wxiclass, fixed trying to use non-existing undo tool in wxiclass

Modified: grass/trunk/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/toolbars.py	2012-01-14 06:47:34 UTC (rev 50175)
+++ grass/trunk/gui/wxpython/vdigit/toolbars.py	2012-01-14 12:35:43 UTC (rev 50176)
@@ -24,6 +24,7 @@
 from core.settings      import UserSettings
 from core.gcmd          import GError
 from icons.icon         import MetaIcon
+from iclass.digit       import IClassVDigit
 
 class VDigitToolbar(BaseToolbar):
     """!Toolbar for digitization
@@ -376,6 +377,10 @@
         
         @param enable False for disable
         """
+        # iclass has no undo, we need to check it
+        if self.FindById(self.undo) is None:
+            return
+        
         if enable:
             if self.GetToolEnabled(self.undo) is False:
                 self.EnableTool(self.undo, True)
@@ -733,7 +738,7 @@
         if 'map' in self.parent.toolbars:
             self.parent.toolbars['map'].combo.SetValue (_('Digitize'))
         
-        if self.digitClass != "iclass.digit.IClassWindow":
+        if self.digitClass != IClassVDigit:
             lmgr = self.parent.GetLayerManager()
             if lmgr:
                 lmgr.toolbars['tools'].Enable('vdigit', enable = False)



More information about the grass-commit mailing list