[GRASS-SVN] r29472 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 18 12:14:56 EST 2007


Author: martinl
Date: 2007-12-18 12:14:55 -0500 (Tue, 18 Dec 2007)
New Revision: 29472

Modified:
   grass/trunk/gui/wxpython/gui_modules/dbm.py
   grass/trunk/gui/wxpython/gui_modules/utils.py
Log:
wxGUI: Attribute Table Manager, disable 'display all' in contextual menu if no item is selected

Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py	2007-12-18 15:39:45 UTC (rev 29471)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py	2007-12-18 17:14:55 UTC (rev 29472)
@@ -922,7 +922,7 @@
         menu.Append(self.popupDataID6, _("Select none"))
         menu.AppendSeparator()
         menu.Append(self.popupDataID7, _("Display selected"))
-        if not self.map:
+        if not self.map or len(list.GetSelectedItems()) == 0:
             menu.Enable(self.popupDataID7, False)
         menu.Append(self.popupDataID8, _("Extract selected"))
         if list.GetFirstSelected() == -1:

Modified: grass/trunk/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/utils.py	2007-12-18 15:39:45 UTC (rev 29471)
+++ grass/trunk/gui/wxpython/gui_modules/utils.py	2007-12-18 17:14:55 UTC (rev 29472)
@@ -99,7 +99,4 @@
             catstr += '%d,' % (cats[i])
             i += 1
         
-    if catstr[-1] == ",":
-        catstr = catstr[:-1]
-
-    return catstr
+    return catstr.strip(',')



More information about the grass-commit mailing list