[GRASS-SVN] r53449 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 17 12:26:45 PDT 2012


Author: martinl
Date: 2012-10-17 12:26:44 -0700 (Wed, 17 Oct 2012)
New Revision: 53449

Modified:
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: Select - mapset is not selectable (don't dismiss)


Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2012-10-17 19:08:58 UTC (rev 53448)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2012-10-17 19:26:44 UTC (rev 53449)
@@ -514,19 +514,21 @@
             
             if self.seltree.GetRootItem() == self.seltree.GetItemParent(item):
                 self.value = [] # cannot select mapset item
+                evt.Skip()
+                return
+            
+            mapsetItem = self.seltree.GetItemParent(item)
+            fullName = self.seltree.GetItemText(item)
+            if self.fullyQualified:
+                fullName += '@' + self.seltree.GetItemText(mapsetItem).split(':', -1)[1].strip()
+            
+            if self.multiple is True:
+                # text item should be unique
+                self.value.append(fullName)
             else:
-                mapsetItem = self.seltree.GetItemParent(item)
-                fullName = self.seltree.GetItemText(item)
-                if self.fullyQualified:
-                    fullName += '@' + self.seltree.GetItemText(mapsetItem).split(':', -1)[1].strip()
-                
-                if self.multiple is True:
-                    # text item should be unique
-                    self.value.append(fullName)
-                else:
-                    self.value = [fullName]
+                self.value = [fullName]
             
-            self.Dismiss()
+        self.Dismiss()
         
         evt.Skip()
 



More information about the grass-commit mailing list