[GRASS-SVN] r57689 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 14 20:04:00 PDT 2013
Author: annakrat
Date: 2013-09-14 20:04:00 -0700 (Sat, 14 Sep 2013)
New Revision: 57689
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: assume layer is 1 instead of Nonewhen module does not have layer option (like v.vol.rst)
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2013-09-14 12:05:20 UTC (rev 57688)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2013-09-15 03:04:00 UTC (rev 57689)
@@ -949,9 +949,14 @@
dbInfo = VectorDBInfo(vector)
try:
- table = dbInfo.GetTable(int(layer))
+ try:
+ layer = int(layer)
+ except TypeError:
+ # assuming layer 1
+ layer = 1
+ table = dbInfo.GetTable(layer)
columnchoices = dbInfo.GetTableDesc(table)
- keyColumn = dbInfo.GetKeyColumn(int(layer))
+ keyColumn = dbInfo.GetKeyColumn(layer)
columns = len(columnchoices.keys()) * ['']
for key, val in columnchoices.iteritems():
columns[val['index']] = key
More information about the grass-commit
mailing list