[GRASS-SVN] r48150 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 5 15:39:10 EDT 2011
Author: martinl
Date: 2011-09-05 12:39:10 -0700 (Mon, 05 Sep 2011)
New Revision: 48150
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: fix GetData()
(merge r48148 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:33:16 UTC (rev 48149)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:39:10 UTC (rev 48150)
@@ -211,12 +211,14 @@
"""!Get list of data items"""
result = list()
dataItems = self.GetItems(objType = ModelData)
+
for action in self.GetItems(objType = ModelAction):
for rel in action.GetRelations():
dataItem = rel.GetData()
if dataItem not in result:
result.append(dataItem)
- dataItems.remove(dataItem)
+ if dataItem in dataItems:
+ dataItems.remove(dataItem)
# standalone data
if dataItems:
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:33:16 UTC (rev 48149)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:39:10 UTC (rev 48150)
@@ -215,6 +215,9 @@
# update reference widgets
for uid in p['wxId-bind']:
win = self.parent.FindWindowById(uid)
+ if not win:
+ continue
+
name = win.GetName()
if name == 'LayerSelect':
More information about the grass-commit
mailing list