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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 11 13:06:15 EDT 2011


Author: martinl
Date: 2011-10-11 10:06:15 -0700 (Tue, 11 Oct 2011)
New Revision: 48739

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: fix fully-qualified names (translated 'mapset' can contain spaces)
       (merge r48738 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2011-10-11 17:02:59 UTC (rev 48738)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2011-10-11 17:06:15 UTC (rev 48739)
@@ -403,7 +403,7 @@
                 item = self.FindItem(item, text, startLetters = startletters)
                 if wx.TreeItemId.IsOk(item):
                     return item
-            elif startletters and self.seltree.GetItemText(item).startswith(text.split('@')[0]):
+            elif startletters and self.seltree.GetItemText(item).startswith(text.split('@', 1)[0]):
                 return item
             item, cookie = self.seltree.GetNextChild(parentItem, cookie)
         return wx.TreeItemId()
@@ -469,8 +469,9 @@
                 self.value = [] 
             else:
                 mapsetItem = self.seltree.GetItemParent(item)
-                fullName = self.seltree.GetItemText(item) + '@' \
-                            + self.seltree.GetItemText(mapsetItem).split(' ', 1)[1]
+                fullName = self.seltree.GetItemText(item) + '@' + \
+                    self.seltree.GetItemText(mapsetItem).split(':', -1)[1].strip()
+                
                 if self.multiple is True:
                     # text item should be unique
                     self.value.append(fullName)
@@ -500,7 +501,7 @@
             else:
                 mapsetItem = self.seltree.GetItemParent(item)
                 fullName = self.seltree.GetItemText(item) + '@' + \
-                    self.seltree.GetItemText(mapsetItem).split(' ', 1)[1]
+                    self.seltree.GetItemText(mapsetItem).split(':', -1)[1].strip()
                 
                 if self.multiple is True:
                     # text item should be unique



More information about the grass-commit mailing list