[GRASS-SVN] r50725 -
grass/branches/develbranch_6/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 8 08:20:25 EST 2012
Author: martinl
Date: 2012-02-08 05:20:25 -0800 (Wed, 08 Feb 2012)
New Revision: 50725
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py
Log:
wGUI: MapLayersDialog - mapType should not depended on localized string
(merge r50724 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py 2012-02-08 13:16:43 UTC (rev 50724)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/dialogs.py 2012-02-08 13:20:25 UTC (rev 50725)
@@ -940,7 +940,7 @@
self.addLayer = wx.Button(self, id = wx.ID_ADD)
self.addLayer.SetToolTipString(_("Select map layers and add them to the list."))
- gridSizer.Add(item = self.addLayer, pos = (0, 1))
+ gridSizer.Add(item = self.addLayer, pos = (0, 1), flag = wx.EXPAND)
self.removeLayer = wx.Button(self, id = wx.ID_REMOVE)
self.removeLayer.SetToolTipString(_("Remove selected layer(s) from list."))
@@ -1162,6 +1162,11 @@
style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER, **kwargs):
"""!Dialog for selecting map layers (raster, vector)
+ Valid mapType values:
+ - raster
+ - raster3d
+ - vector
+
@param mapType type of map (if None: raster, vector, 3d raster, if one only: selects it and disables selection)
@param selectAll all/none maps should be selected by default
@param fullyQualified True if dialog should return full map names by default
@@ -1235,7 +1240,12 @@
choices = [_('raster'), _('3D raster'), _('vector')], size = (100,-1))
if self.mapType:
- self.layerType.SetStringSelection(self.mapType)
+ if self.mapType == 'raster':
+ self.layerType.SetSelection(0)
+ elif self.mapType == 'raster3d':
+ self.layerType.SetSelection(1)
+ elif self.mapType == 'vector':
+ self.layerType.SetSelection(2)
self.layerType.Disable()
else:
self.layerType.SetSelection(0)
More information about the grass-commit
mailing list