[GRASS-SVN] r33211 - grass/trunk/gui/wxpython

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


Author: martinl
Date: 2008-09-02 05:05:07 -0400 (Tue, 02 Sep 2008)
New Revision: 33211

Modified:
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: remove map layer dialog cosmetics, multiple items can be removed
(merge from devbr6, r33209)


Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2008-09-02 09:03:51 UTC (rev 33210)
+++ grass/trunk/gui/wxpython/wxgui.py	2008-09-02 09:05:07 UTC (rev 33211)
@@ -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