[GRASS-SVN] r48149 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 5 15:33:16 EDT 2011
Author: martinl
Date: 2011-09-05 12:33:16 -0700 (Mon, 05 Sep 2011)
New Revision: 48149
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: fix GetData()
(merge r48148 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:31:33 UTC (rev 48148)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:33:16 UTC (rev 48149)
@@ -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/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:31:33 UTC (rev 48148)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:33:16 UTC (rev 48149)
@@ -211,6 +211,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