[GRASS-SVN] r37624 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 30 12:20:25 EDT 2009
Author: martinl
Date: 2009-05-30 12:20:25 -0400 (Sat, 30 May 2009)
New Revision: 37624
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/menuform: fix 'values'
(merge from trunk, r37623)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2009-05-30 16:18:22 UTC (rev 37623)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2009-05-30 16:20:25 UTC (rev 37624)
@@ -445,23 +445,25 @@
age = element = prompt = None
if node_gisprompt is not None:
gisprompt = True
- age = node_gisprompt.get('age')
- element = node_gisprompt.get('element')
- prompt = node_gisprompt.get('prompt')
+ age = node_gisprompt.get('age', '')
+ element = node_gisprompt.get('element', '')
+ prompt = node_gisprompt.get('prompt', '')
# value(s)
values = []
values_desc = []
- for pv in p.findall('value'):
- values.append(pv.text)
- pvd = pv.find('description')
- if pvd:
- values_desc.append(pvd.text)
+ node_values = p.find('values')
+ if node_values is not None:
+ for pv in node_values.findall('value'):
+ values.append(self.__getNodeText(pv, 'name'))
+ desc = self.__getNodeText(pv, 'description')
+ if desc:
+ values_desc.append(desc)
# keydesc
key_desc = []
node_key_desc = p.find('keydesc')
- if node_key_desc:
+ if node_key_desc is not None:
for ki in node_key_desc.findall('item'):
key_desc.append(ki.text)
More information about the grass-commit
mailing list