[GRASS-SVN] r55902 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 18 09:35:32 PDT 2013
Author: turek
Date: 2013-04-18 09:35:32 -0700 (Thu, 18 Apr 2013)
New Revision: 55902
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
layerselect: set default value only if exists
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2013-04-18 16:20:01 UTC (rev 55901)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2013-04-18 16:35:32 UTC (rev 55902)
@@ -851,12 +851,12 @@
if len(layers) > 0:
self.SetItems(layers)
- self.SetValue(layers[0])
else:
self.Clear()
- self.SetValue("")
- if self.default:
+ self.SetValue("")
+
+ if self.default and self.default in layers:
self.SetValue(self.default)
class DriverSelect(wx.ComboBox):
More information about the grass-commit
mailing list