[GRASS-SVN] r30217 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 17 17:39:21 EST 2008


Author: martinl
Date: 2008-02-17 17:39:21 -0500 (Sun, 17 Feb 2008)
New Revision: 30217

Modified:
   grass/trunk/gui/wxpython/gui_modules/digit.py
Log:
wxGUI/vdigit: Use default layer number for vector maps without DB connection

Modified: grass/trunk/gui/wxpython/gui_modules/digit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/digit.py	2008-02-17 20:07:11 UTC (rev 30216)
+++ grass/trunk/gui/wxpython/gui_modules/digit.py	2008-02-17 22:39:21 UTC (rev 30217)
@@ -1539,8 +1539,11 @@
         text = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Layer"))
         if self.parent.digit.map:
             layers = map(str, self.parent.digit.GetLayers())
+            if len(layers) == 0:
+                layers = [str(self.parent.digit.settings["layer"]), ]
         else:
-            layers = [str(self.parent.digit.settings["layer"])]
+            layers = [str(self.parent.digit.settings["layer"]), ]
+        
         self.layer = wx.Choice(parent=panel, id=wx.ID_ANY, size=(125, -1),
                                choices=layers)
         self.layer.SetStringSelection(str(self.parent.digit.settings["layer"]))



More information about the grass-commit mailing list