瀏覽代碼

wxGUI: fix welcome screen on first run (no .grassrcX available)
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33756)


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

Martin Landa 16 年之前
父節點
當前提交
f22924c1d3
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      gui/wxpython/gis_set.py

+ 5 - 2
gui/wxpython/gis_set.py

@@ -24,6 +24,7 @@ import os
 import sys
 import glob
 import shutil
+import copy
 
 ### i18N
 import gettext
@@ -566,7 +567,7 @@ class GRASSStartup(wx.Frame):
                                     'location=%s' % locationName,
                                     'gisdbase=%s' % self.gisdbase],
                                    stderr=None)
-
+            
             for line in mapsets.ReadStdOutput():
                 self.listOfMapsetsSelectable += line.split(' ')
         except gcmd.CmdError:
@@ -576,7 +577,9 @@ class GRASSStartup(wx.Frame):
                           "set=LOCATION_NAME=%s" % locationName])
             gcmd.Command(["g.gisenv",
                           "set=MAPSET=PERMANENT"])
-
+            # first run only
+            self.listOfMapsetsSelectable = copy.copy(self.listOfMapsets)
+        
         disabled = []
         idx = 0
         for mapset in self.listOfMapsets: