[GRASS-SVN] r59069 - in grass/branches/develbranch_6/gui/wxpython: gui_core modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 16 07:29:16 PST 2014
Author: annakrat
Date: 2014-02-16 07:29:16 -0800 (Sun, 16 Feb 2014)
New Revision: 59069
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py
Log:
wxGUI: fix r3.mapcalc in develbranch
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py 2014-02-16 15:03:59 UTC (rev 59068)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py 2014-02-16 15:29:16 UTC (rev 59069)
@@ -546,7 +546,7 @@
else:
# other GRASS commands (r|v|g|...)
hasParams = False
- if command[0] != 'r.mapcalc':
+ if command[0] not in ('r.mapcalc', 'r3.mapcalc'):
try:
task = GUI(show = None).ParseCommand(command)
except GException, e:
@@ -881,7 +881,7 @@
if self.parent.GetName() == "LayerManager":
self.btnCmdAbort.Enable(False)
if event.cmd[0] not in globalvar.grassCmd or \
- event.cmd[0] == 'r.mapcalc':
+ event.cmd[0] in ('r.mapcalc', 'r3.mapcalc'):
return
tree = self.parent.GetLayerTree()
Modified: grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py 2014-02-16 15:03:59 UTC (rev 59068)
+++ grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py 2014-02-16 15:29:16 UTC (rev 59069)
@@ -492,18 +492,23 @@
self.parent.Raise()
else:
RunCommand(self.cmd,
- "%s=%s" % (name, expr))
-
+ **{name: expr})
+
def OnDone(self, cmd, returncode):
"""!Add create map to the layer tree"""
if not self.addbox.IsChecked():
return
name = self.newmaptxt.GetValue().strip(' "') + '@' + grass.gisenv()['MAPSET']
+ ltype = 'raster'
+ lcmd = 'd.rast'
+ if self.rast3d:
+ ltype = '3d-raster'
+ lcmd = 'd.rast3d.py'
mapTree = self.parent.GetLayerTree()
if not mapTree.GetMap().GetListOfLayers(l_name = name):
- mapTree.AddLayer(ltype = 'raster',
+ mapTree.AddLayer(ltype = ltype,
lname = name,
- lcmd = ['d.rast', 'map=%s' % name],
+ lcmd = [lcmd, 'map=%s' % name],
multiple = False)
display = self.parent.GetLayerTree().GetMapDisplay()
More information about the grass-commit
mailing list