[GRASS-SVN] r33209 - grass/branches/develbranch_6/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 2 05:03:04 EDT 2008


Author: martinl
Date: 2008-09-02 05:03:04 -0400 (Tue, 02 Sep 2008)
New Revision: 33209

Modified:
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: remove map layer dialog cosmetics, multiple items can be removed

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2008-09-02 08:53:34 UTC (rev 33208)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2008-09-02 09:03:04 UTC (rev 33209)
@@ -1403,9 +1403,18 @@
             return
 
         if UserSettings.Get(group='manager', key='askOnRemoveLayer', subkey='enabled'):
-            layerName = str(self.curr_page.maptree.GetItemText(self.curr_page.maptree.layer_selected))
+            layerName = ''
+            for item in self.curr_page.maptree.GetSelections():
+                name = str(self.curr_page.maptree.GetItemText(item))
+                idx = name.find('(opacity')
+                if idx > -1:
+                    layerName += '<' + name[:idx].strip(' ') + '>, '
+                else:
+                    layerName += '<' + name + '>, '
+            layerName = layerName.rstrip(', ')
+            
             if layerName:
-                message = _("Do you want to remove map layer <%s> "
+                message = _("Do you want to remove map layer %s "
                             "from layer tree?") % layerName
             else:
                 message = _("Do you want to remove selected map layer "



More information about the grass-commit mailing list