[GRASS-SVN] r67784 - in grass/branches/releasebranch_7_0/gui/wxpython: gmodeler gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 7 15:20:06 PST 2016
Author: martinl
Date: 2016-02-07 15:20:06 -0800 (Sun, 07 Feb 2016)
New Revision: 67784
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
Log:
wxGUI/gmodeler: fix ModelDataDialog (merge r67783 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py 2016-02-07 23:10:58 UTC (rev 67783)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py 2016-02-07 23:20:06 UTC (rev 67784)
@@ -53,6 +53,7 @@
SimpleDialog.__init__(self, parent, title)
self.element = Select(parent = self.panel,
+ type = self.shape.GetPrompt(),
validator = SimpleValidator(callback = self.ValidatorCallback))
self.element.SetValue(shape.GetValue())
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2016-02-07 23:10:58 UTC (rev 67783)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2016-02-07 23:20:06 UTC (rev 67784)
@@ -1189,10 +1189,11 @@
completed = (self.frame.GetOptData, shape, shape.GetParams()))
elif isinstance(shape, ModelData):
- dlg = ModelDataDialog(parent = self.frame, shape = shape)
- shape.SetPropDialog(dlg)
- dlg.CentreOnParent()
- dlg.Show()
+ if shape.GetPrompt() in ('raster', 'vector', 'raster_3d'):
+ dlg = ModelDataDialog(parent = self.frame, shape = shape)
+ shape.SetPropDialog(dlg)
+ dlg.CentreOnParent()
+ dlg.Show()
elif isinstance(shape, ModelLoop):
dlg = ModelLoopDialog(parent = self.frame, shape = shape)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2016-02-07 23:10:58 UTC (rev 67783)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py 2016-02-07 23:20:06 UTC (rev 67784)
@@ -247,8 +247,9 @@
if inputText:
root = self.seltree.GetRootItem()
match = self.FindItem(root, inputText, startLetters = True)
- self.seltree.EnsureVisible(match)
- self.seltree.SelectItem(match)
+ if match.IsOk():
+ self.seltree.EnsureVisible(match)
+ self.seltree.SelectItem(match)
def GetAdjustedSize(self, minWidth, prefHeight, maxHeight):
"""Reads UserSettings to get height (which was 200 in old implementation).
More information about the grass-commit
mailing list