[GRASS-SVN] r30936 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 11 08:16:12 EDT 2008


Author: martinl
Date: 2008-04-11 08:16:12 -0400 (Fri, 11 Apr 2008)
New Revision: 30936

Modified:
   grass/trunk/gui/wxpython/gui_modules/location_wizard.py
Log:
wxGUI (location_wizard): set region settings bugfix, do not use 'g.mapset' here (which creates gislock)

Modified: grass/trunk/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/location_wizard.py	2008-04-11 12:01:19 UTC (rev 30935)
+++ grass/trunk/gui/wxpython/gui_modules/location_wizard.py	2008-04-11 12:16:12 UTC (rev 30936)
@@ -2062,11 +2062,14 @@
                 envval[key] = val
             self.currlocation = envval['LOCATION_NAME'].strip("';")
             self.currmapset = envval['MAPSET'].strip("';")
-            if self.currlocation == self.location and self.currmapset == 'PERMANENT':
-                pass
-            else:
-                cmdlist = ['g.mapset', 'location=%s' % self.location, 'mapset=PERMANENT']
-                gcmd.Command(cmdlist)
+            if self.currlocation != self.location or self.currmapset != 'PERMANENT':
+                # cmdlist = ['g.mapset', 'location=%s' % self.location, 'mapset=PERMANENT']
+                # gcmd.Command(cmdlist
+                gcmd.Command(["g.gisenv",
+                              "set=LOCATION_NAME=%s" % self.location])
+                gcmd.Command(["g.gisenv",
+                              "set=MAPSET=PERMANENT"])
+
         else:
             dlg = wx.MessageBox(parent=self,
                                 message=_('Invalid location selected.'),



More information about the grass-commit mailing list