[GRASS-SVN] r33220 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 2 08:58:50 EDT 2008


Author: martinl
Date: 2008-09-02 08:58:49 -0400 (Tue, 02 Sep 2008)
New Revision: 33220

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: bug fix - query vector map if no map layer selected


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-09-02 12:07:26 UTC (rev 33219)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-09-02 12:58:49 UTC (rev 33220)
@@ -3435,14 +3435,15 @@
         toolsmenu.AppendItem(modify)
         self.Bind(wx.EVT_MENU, self.OnQueryModify, modify)
         digitToolbar = self.toolbars['vdigit']
-        layer_selected = self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer']
-        if digitToolbar and \
-                digitToolbar.GetLayer() == layer_selected:
-            modify.Enable(False)
-        else:
-            if action == "modifyAttrb":
-                modify.Check(True)
-
+        if self.tree.layer_selected:
+            layer_selected = self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer']
+            if digitToolbar and \
+                   digitToolbar.GetLayer() == layer_selected:
+                modify.Enable(False)
+            else:
+                if action == "modifyAttrb":
+                    modify.Check(True)
+        
         self.PopupMenu(toolsmenu)
         toolsmenu.Destroy()
 



More information about the grass-commit mailing list