[GRASS-SVN] r53241 - grass/branches/releasebranch_6_4/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 20 00:58:26 PDT 2012
Author: annakrat
Date: 2012-09-20 00:58:26 -0700 (Thu, 20 Sep 2012)
New Revision: 53241
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/core/utils.py
Log:
wxGUI: add right mapset to map names in command line
Modified: grass/branches/releasebranch_6_4/gui/wxpython/core/utils.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/core/utils.py 2012-09-20 07:34:54 UTC (rev 53240)
+++ grass/branches/releasebranch_6_4/gui/wxpython/core/utils.py 2012-09-20 07:58:26 UTC (rev 53241)
@@ -134,22 +134,26 @@
if len(params) < 1:
return mapname, False
- mapname = params[0][2]
- mapset = ''
- if fullyQualified and '@' not in mapname:
- if layerType in ('raster', 'vector', '3d-raster', 'rgb', 'his'):
- try:
- if layerType in ('raster', 'rgb', 'his'):
- findType = 'cell'
- else:
- findType = layerType
- mapset = grass.find_file(mapname, element = findType)['mapset']
- except AttributeError, e: # not found
- return '', False
- if not mapset:
- found = False
- else:
- mapset = grass.gisenv()['MAPSET']
+ # need to add mapset for all maps
+ mapsets = {}
+ for i, p, v in params:
+ mapname = v
+ mapset = ''
+ if fullyQualified and '@' not in mapname:
+ if layerType in ('raster', 'vector', '3d-raster', 'rgb', 'his'):
+ try:
+ if layerType in ('raster', 'rgb', 'his'):
+ findType = 'cell'
+ else:
+ findType = layerType
+ mapset = grass.find_file(mapname, element = findType)['mapset']
+ except AttributeError, e: # not found
+ return '', False
+ if not mapset:
+ found = False
+ else:
+ mapset = grass.gisenv()['MAPSET']
+ mapsets[i] = mapset
# update dcmd
for i, p, v in params:
@@ -157,8 +161,8 @@
dcmd[i] = p + '=' + v
else:
dcmd[i] = v
- if mapset:
- dcmd[i] += '@' + mapset
+ if i in mapsets and mapsets[i]:
+ dcmd[i] += '@' + mapsets[i]
maps = list()
for i, p, v in params:
More information about the grass-commit
mailing list