[GRASS-SVN] r52811 - grass/trunk/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 21 05:49:16 PDT 2012
Author: annakrat
Date: 2012-08-21 05:49:15 -0700 (Tue, 21 Aug 2012)
New Revision: 52811
Modified:
grass/trunk/gui/wxpython/modules/mcalc_builder.py
Log:
wxGUI/mapcalc: fixed #1306
Modified: grass/trunk/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/modules/mcalc_builder.py 2012-08-21 12:45:49 UTC (rev 52810)
+++ grass/trunk/gui/wxpython/modules/mcalc_builder.py 2012-08-21 12:49:15 UTC (rev 52811)
@@ -474,6 +474,9 @@
"a new raster map to create."))
return
+ if not (name[0] == '"' and name[-1] == '"') and any((char in name) for char in self.charactersToQuote):
+ name = '"' + name + '"'
+
expr = self.text_mcalc.GetValue().strip().replace("\n", " ")
if not expr:
GError(parent = self,
@@ -500,7 +503,7 @@
"""!Add create map to the layer tree"""
if not self.addbox.IsChecked():
return
- name = self.newmaptxt.GetValue().strip() + '@' + grass.gisenv()['MAPSET']
+ name = self.newmaptxt.GetValue().strip(' "') + '@' + grass.gisenv()['MAPSET']
mapTree = self.parent.GetLayerTree()
if not mapTree.GetMap().GetListOfLayers(l_name = name):
mapTree.AddLayer(ltype = 'raster',
More information about the grass-commit
mailing list