[GRASS-SVN] r56965 - grass/branches/develbranch_6/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 2 00:14:20 PDT 2013
Author: hamish
Date: 2013-07-02 00:14:11 -0700 (Tue, 02 Jul 2013)
New Revision: 56965
Modified:
grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py
Log:
catch case where section titles exist before and between any layers
Modified: grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py 2013-07-02 00:14:13 UTC (rev 56964)
+++ grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py 2013-07-02 07:14:11 UTC (rev 56965)
@@ -200,15 +200,18 @@
layers[value] = {}
lastLayer = value
elif key == 'title':
- layers[lastLayer][key] = value
+ if lastLayer and 'title' not in layers[lastLayer]:
+ layers[lastLayer][key] = value
elif key == 'style':
- if 'style' not in layers[lastLayer]:
- layers[lastLayer]['style'] = {}
- layers[lastLayer]['style'][value] = ''
- lastStyle = value
+ if lastLayer:
+ if 'style' not in layers[lastLayer]:
+ layers[lastLayer]['style'] = {}
+ layers[lastLayer]['style'][value] = ''
+ lastStyle = value
elif key == 'style title':
- layers[lastLayer]['style'][lastStyle] = value
-
+ if lastLayer:
+ layers[lastLayer]['style'][lastStyle] = value
+
# update list of layers
self.list.LoadData(layers)
More information about the grass-commit
mailing list