Browse Source

wxGUI: fix for missing toolbar variable

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45264 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 years ago
parent
commit
21838f6d58
1 changed files with 5 additions and 4 deletions
  1. 5 4
      gui/wxpython/gui_modules/toolbars.py

+ 5 - 4
gui/wxpython/gui_modules/toolbars.py

@@ -109,10 +109,11 @@ class AbstractToolbar(wx.ToolBar):
         if self.parent.GetName() == "GCPFrame":
         if self.parent.GetName() == "GCPFrame":
             return
             return
         
         
-        if self.parent.toolbars['vdigit']:
-            # update vdigit toolbar (unselect currently selected tool)
-            id = self.parent.toolbars['vdigit'].GetAction(type = 'id')
-            self.parent.toolbars['vdigit'].ToggleTool(id, False)
+        if hasattr(self.parent, 'toolbars'):
+            if self.parent.toolbars['vdigit']:
+                # update vdigit toolbar (unselect currently selected tool)
+                id = self.parent.toolbars['vdigit'].GetAction(type = 'id')
+                self.parent.toolbars['vdigit'].ToggleTool(id, False)
         
         
         if event:
         if event:
             # deselect previously selected tool
             # deselect previously selected tool