[GRASS-SVN] r57013 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 4 07:11:00 PDT 2013
Author: turek
Date: 2013-07-04 07:11:00 -0700 (Thu, 04 Jul 2013)
New Revision: 57013
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
LayerSelect: include -1 fix
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2013-07-04 12:49:20 UTC (rev 57012)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2013-07-04 14:11:00 UTC (rev 57013)
@@ -802,11 +802,9 @@
@param dsn OGR data source name
"""
layers = list()
- if self.all:
- layers.append('-1')
if vector:
- layers = GetVectorNumberOfLayers(vector)
+ layers = GetVectorNumberOfLayers(vector)
elif dsn:
ret = RunCommand('v.in.ogr',
@@ -816,13 +814,16 @@
dsn = dsn)
if ret:
layers = ret.splitlines()
-
+
if self.default:
if len(layers) == 0:
layers.insert(0, str(self.default))
elif self.default not in layers:
layers.append(self.default)
+ if self.all:
+ layers.insert(0, '-1')
+
if len(layers) > 0:
self.SetItems(layers)
else:
More information about the grass-commit
mailing list