[GRASS-SVN] r41628 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 30 11:59:10 EDT 2010
Author: martinl
Date: 2010-03-30 11:59:09 -0400 (Tue, 30 Mar 2010)
New Revision: 41628
Modified:
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: fix OnCancel()
Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2010-03-30 15:21:56 UTC (rev 41627)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2010-03-30 15:59:09 UTC (rev 41628)
@@ -46,7 +46,7 @@
from grass.script import core as grass
-debug = False
+debug = True
class ModelFrame(wx.Frame):
def __init__(self, parent, id = wx.ID_ANY, title = _("Graphical modeler (under development)"), **kwargs):
@@ -276,7 +276,7 @@
def GetOptData(self, dcmd, layer, params, propwin):
"""!Process action data"""
layer.SetProperties(dcmd, params, propwin)
-
+
if params: # add data items
width, height = self.canvas.GetSize()
x = [width/2 + 200, width/2 - 200]
@@ -447,8 +447,10 @@
def SetProperties(self, dcmd, params, propwin):
"""!Record properties dialog"""
- self.cmd = dcmd
- self.params = params
+ if dcmd:
+ self.cmd = dcmd
+ if self.params:
+ self.params = params
self.propWin = propwin
def GetPropDialog(self):
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2010-03-30 15:21:56 UTC (rev 41627)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2010-03-30 15:59:09 UTC (rev 41628)
@@ -918,7 +918,7 @@
if cmd is not None and self.get_dcmd is not None:
# return d.* command to layer tree for rendering
self.get_dcmd(cmd, self.layer, {"params": self.task.params,
- "flags" :self.task.flags},
+ "flags" : self.task.flags},
self)
# echo d.* command to output console
# self.parent.writeDCommand(cmd)
@@ -994,7 +994,8 @@
self.parent.Delete(self.layer)
self.Destroy()
elif self.parent and self.parent.GetName() == 'Modeler':
- self.Hide()
+ self.get_dcmd(None, self.layer, None, None)
+ self.Destroy()
else:
# cancel for non-display commands
self.Destroy()
More information about the grass-commit
mailing list