Skip to content

Commit

Permalink
wxGUI: check if vector exists
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45030 15284696-431f-4ddb-bdfa-cd5b030d7da7
  • Loading branch information
landam committed Jan 14, 2011
1 parent 8e145ff commit ecd834e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gui/wxpython/gui_modules/menuform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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'),
Expand Down

0 comments on commit ecd834e

Please sign in to comment.