[GRASS-SVN] r45030 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 14 15:02:43 EST 2011
Author: martinl
Date: 2011-01-14 12:02:43 -0800 (Fri, 14 Jan 2011)
New Revision: 45030
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: check if vector exists
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-01-14 15:38:23 UTC (rev 45029)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-01-14 20:02:43 UTC (rev 45030)
@@ -272,7 +272,7 @@
table = pTable.get('value', '')
if name == 'LayerSelect':
- if not cparams[map]['layers']:
+ if cparams.has_key(map) and not cparams[map]['layers']:
win.InsertLayers(vector = map)
cparams[map]['layers'] = win.GetItems()
@@ -297,13 +297,11 @@
elif name == 'ColumnSelect':
if map:
- try:
+ if cparams.has_key(map):
if not cparams[map]['dbInfo']:
cparams[map]['dbInfo'] = gselect.VectorDBInfo(map)
self.data[win.InsertColumns] = { 'vector' : map, 'layer' : layer,
'dbInfo' : cparams[map]['dbInfo'] }
- except KeyError:
- pass
else: # table
if driver and db:
self.data[win.InsertTableColumns] = { 'table' : pTable.get('value'),
More information about the grass-commit
mailing list