From ecd834e821c3e7048bd4445353571d122f5f4516 Mon Sep 17 00:00:00 2001 From: Martin Landa Date: Fri, 14 Jan 2011 20:02:43 +0000 Subject: [PATCH] wxGUI: check if vector exists git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45030 15284696-431f-4ddb-bdfa-cd5b030d7da7 --- gui/wxpython/gui_modules/menuform.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gui/wxpython/gui_modules/menuform.py b/gui/wxpython/gui_modules/menuform.py index 6cc2fb660d1..237ecc5bdc6 100644 --- a/gui/wxpython/gui_modules/menuform.py +++ b/gui/wxpython/gui_modules/menuform.py @@ -272,7 +272,7 @@ def run(self): 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 @@ def run(self): 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'),