[GRASS-SVN] r42637 - in grass/branches/develbranch_6/gui/wxpython:
. gui_modules xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 22 19:12:51 EDT 2010
Author: martinl
Date: 2010-06-22 23:12:51 +0000 (Tue, 22 Jun 2010)
New Revision: 42637
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
grass/branches/develbranch_6/gui/wxpython/wxgui.py
grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
Log:
fix #1097
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2010-06-22 22:59:15 UTC (rev 42636)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2010-06-22 23:12:51 UTC (rev 42637)
@@ -37,7 +37,7 @@
"""!Mapcalc Frame class. Calculator-style window to create and run
r(3).mapcalc statements
"""
- def __init__(self, parent, cmd, id = wx.ID_ANY, title = _('Map calculator'),
+ def __init__(self, parent, cmd, id = wx.ID_ANY,
style = wx.DEFAULT_FRAME_STYLE | wx.RESIZE_BORDER, **kwargs):
self.parent = parent
if self.parent:
@@ -50,9 +50,11 @@
if self.cmd == 'r.mapcalc':
self.rast3d = False
+ title = _('GRASS GIS Raster Calculator')
if self.cmd == 'r3.mapcalc':
self.rast3d = True
-
+ title = _('GRASS GIS 3D Raster Calculator')
+
wx.Frame.__init__(self, parent, id = id, title = title, **kwargs)
self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2010-06-22 22:59:15 UTC (rev 42636)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2010-06-22 23:12:51 UTC (rev 42637)
@@ -399,10 +399,10 @@
cmdlist = cmd.split(' ')
except: # already list?
cmdlist = cmd
-
+
# check list of dummy commands for GUI modules that do not have GRASS
# bin modules or scripts.
- if cmd in ['vcolors']:
+ if cmd in ['vcolors', 'r.mapcalc', 'r3.mapcalc']:
return cmdlist
try:
@@ -411,13 +411,14 @@
type = self.curr_page.maptree.GetPyData(layer)[0]['type']
except:
layer = None
+
if layer and len(cmdlist) == 1: # only if no paramaters given
if (type == 'raster' and cmdlist[0][0] == 'r' and cmdlist[0][1] != '3') or \
(type == 'vector' and cmdlist[0][0] == 'v'):
input = menuform.GUI().GetCommandInputMapParamKey(cmdlist[0])
if input:
cmdlist.append("%s=%s" % (input, name))
-
+
return cmdlist
def RunMenuCmd(self, event, cmd = ''):
@@ -1015,22 +1016,11 @@
if event:
cmd = self.GetMenuCmd(event)
- win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator'),
+ win = mapcalculator.MapCalcFrame(parent = self,
cmd=cmd[0])
win.CentreOnScreen()
win.Show()
- def OnMapCalculator3D(self, event, cmd =''):
- """!Init map calculator for interactive creation of mapcalc statements
- """
- if event:
- cmd = self.GetMenuCmd(event)
-
- win = mapcalculator.MapCalcFrame(parent = self, title = _('GRASS GIS Map Calculator (3D raster)'),
- cmd=cmd[0])
- win.CentreOnScreen()
- win.Show()
-
def OnVectorCleaning(self, event, cmd = ''):
"""!Init interactive vector cleaning
"""
Modified: grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2010-06-22 22:59:15 UTC (rev 42636)
+++ grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2010-06-22 23:12:51 UTC (rev 42637)
@@ -2702,7 +2702,7 @@
<label>Volume calculator</label>
<help>Map calculator for 3D raster map algebra.</help>
<keywords>raster,algebra</keywords>
- <handler>OnMapCalculator3D</handler>
+ <handler>OnMapCalculator</handler>
<command>r3.mapcalc</command>
</menuitem>
<menuitem>
More information about the grass-commit
mailing list