[GRASS-SVN] r48148 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 5 15:31:33 EDT 2011
Author: martinl
Date: 2011-09-05 12:31:33 -0700 (Mon, 05 Sep 2011)
New Revision: 48148
Modified:
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/modeler: fix GetData()
Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:07:48 UTC (rev 48147)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2011-09-05 19:31:33 UTC (rev 48148)
@@ -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/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:07:48 UTC (rev 48147)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-09-05 19:31:33 UTC (rev 48148)
@@ -219,6 +219,9 @@
# update reference widgets
for uid in p['wxId-bind']:
win = self.parent.FindWindowById(uid)
+ if not win:
+ continue
+
name = win.GetName()
map = layer = None
More information about the grass-commit
mailing list