Kaynağa Gözat

wxGUI: show all mapsets in MapsetSelect
(merge https://trac.osgeo.org/grass/changeset/44344 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@44346 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 yıl önce
ebeveyn
işleme
9ed8351f75

+ 2 - 2
gui/wxpython/gui_modules/gselect.py

@@ -821,7 +821,7 @@ class MapsetSelect(wx.ComboBox):
             self.location = location
         
         if setItems:
-            self.SetItems(utils.GetListOfMapsets(self.gisdbase, self.location, selectable = True)) # selectable
+            self.SetItems(utils.GetListOfMapsets(self.gisdbase, self.location, selectable = False)) # selectable
 
     def UpdateItems(self, location, dbase = None):
         """!Update list of mapsets for given location
@@ -833,7 +833,7 @@ class MapsetSelect(wx.ComboBox):
             self.gisdbase = dbase
         self.location = location
         if location:
-            self.SetItems(utils.GetListOfMapsets(self.gisdbase, self.location, selectable = True))
+            self.SetItems(utils.GetListOfMapsets(self.gisdbase, self.location, selectable = False))
         else:
             self.SetItems([])
         

+ 2 - 4
gui/wxpython/gui_modules/utils.py

@@ -627,11 +627,9 @@ def GetListOfMapsets(dbase, location, selectable = False):
     else:
         for mapset in glob.glob(os.path.join(dbase, location, "*")):
             if os.path.isdir(mapset) and \
-                    os.path.isfile(os.path.join(dbase, location, mapset, "WIND")) and \
-                    os.path.basename(mapset) != 'PERMANENT':
+                    os.path.isfile(os.path.join(dbase, location, mapset, "WIND")):
                 listOfMapsets.append(EncodeString(os.path.basename(mapset)))
-        listOfMapsets.insert(0, 'PERMANENT')
-
+    
     ListSortLower(listOfMapsets)    
     return listOfMapsets