[GRASS-SVN] r52814 - grass/branches/releasebranch_6_4/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 21 06:06:09 PDT 2012
Author: annakrat
Date: 2012-08-21 06:06:08 -0700 (Tue, 21 Aug 2012)
New Revision: 52814
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/modules/mcalc_builder.py
Log:
wxGUI/mapcalc: fixed #1306 (merge from trunk, r52811)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/modules/mcalc_builder.py 2012-08-21 13:05:23 UTC (rev 52813)
+++ grass/branches/releasebranch_6_4/gui/wxpython/modules/mcalc_builder.py 2012-08-21 13:06:08 UTC (rev 52814)
@@ -459,6 +459,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,
@@ -478,7 +481,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