[GRASS-SVN] r48664 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 6 08:56:02 EDT 2011
Author: martinl
Date: 2011-10-06 05:56:02 -0700 (Thu, 06 Oct 2011)
New Revision: 48664
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: fully qualified names optional (add map layers)
(merge r48663 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py 2011-10-06 12:54:14 UTC (rev 48663)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py 2011-10-06 12:56:02 UTC (rev 48664)
@@ -864,6 +864,10 @@
self.LoadMapLayers(self.layerType.GetStringSelection()[:4],
self.mapset.GetStringSelection())
+ self.fullyQualified = wx.CheckBox(parent = self, id = wx.ID_ANY,
+ label = _("Use fully-qualified map names"))
+ self.fullyQualified.SetValue(True)
+
# buttons
btnCancel = wx.Button(parent = self, id = wx.ID_CANCEL)
btnOk = wx.Button(parent = self, id = wx.ID_OK)
@@ -878,6 +882,8 @@
mainSizer = wx.BoxSizer(wx.VERTICAL)
mainSizer.Add(item = self.bodySizer, proportion = 1,
flag = wx.EXPAND | wx.ALL, border = 5)
+ mainSizer.Add(item = self.fullyQualified, proportion = 0,
+ flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 5)
mainSizer.Add(item = btnSizer, proportion = 0,
flag = wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, border = 5)
@@ -950,6 +956,7 @@
self.layers.Bind(wx.EVT_RIGHT_DOWN, self.OnMenu)
self.filter.Bind(wx.EVT_TEXT, self.OnFilter)
self.toggle.Bind(wx.EVT_CHECKBOX, self.OnToggle)
+
return bodySizer
def LoadMapLayers(self, type, mapset):
@@ -1044,13 +1051,16 @@
for indx in self.layers.GetSelections():
# layers.append(self.layers.GetStringSelec(indx))
pass
-
- # return fully qualified map names
+
+ fullyQualified = self.fullyQualified.IsChecked()
mapset = self.mapset.GetStringSelection()
for item in range(self.layers.GetCount()):
if not self.layers.IsChecked(item):
continue
- layerNames.append(self.layers.GetString(item) + '@' + mapset)
+ if fullyQualified:
+ layerNames.append(self.layers.GetString(item) + '@' + mapset)
+ else:
+ layerNames.append(self.layers.GetString(item))
return layerNames
More information about the grass-commit
mailing list