[GRASS-SVN] r34947 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Dec 19 17:58:30 EST 2008
Author: martinl
Date: 2008-12-19 17:58:30 -0500 (Fri, 19 Dec 2008)
New Revision: 34947
Modified:
grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: fix load layers (if current mapset / layer type is empty)
Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-12-19 22:42:44 UTC (rev 34946)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2008-12-19 22:58:30 UTC (rev 34947)
@@ -689,7 +689,11 @@
@param type layer type ('raster' or 'vector')
@param mapset mapset name
"""
- self.map_layers = grass.list_grouped2(type=type, mapset=mapset)[mapset]
+ try:
+ self.map_layers = grass.list_grouped2(type=type, mapset=mapset)[mapset]
+ except KeyError:
+ self.map_layers = []
+
self.layers.Set(self.map_layers)
# check all items by default
More information about the grass-commit
mailing list