[GRASS-SVN] r36092 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 25 06:09:47 EST 2009
Author: martinl
Date: 2009-02-25 06:09:47 -0500 (Wed, 25 Feb 2009)
New Revision: 36092
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: only vector map from current mapset can be modified
(merge from trunk, r36090)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py 2009-02-25 11:07:35 UTC (rev 36091)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py 2009-02-25 11:09:47 UTC (rev 36092)
@@ -3558,10 +3558,18 @@
self.tree.GetPyData(self.tree.layer_selected)[0]['type'] != 'vector':
wx.MessageBox(parent=self,
message=_("No vector map selected for querying."),
- caption=_("Message"),
+ caption=_("Vector querying"),
style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
- return
+ return
+ if self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer'].GetMapset() != \
+ grass.gisenv()['MAPSET']:
+ wx.MessageBox(parent=self,
+ message=_("Only vector map from the current mapset can be modified."),
+ caption=_("Vector querying"),
+ style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
+ return
+
posWindow = self.ClientToScreen((x + self.MapWindow.dialogOffset,
y + self.MapWindow.dialogOffset))
@@ -3639,8 +3647,9 @@
digitToolbar = self.toolbars['vdigit']
if self.tree.layer_selected:
layer_selected = self.tree.GetPyData(self.tree.layer_selected)[0]['maplayer']
- if digitToolbar and \
- digitToolbar.GetLayer() == layer_selected:
+ if layer_selected.GetType() != 'vector' or \
+ (digitToolbar and \
+ digitToolbar.GetLayer() == layer_selected):
modify.Enable(False)
else:
if action == "modifyAttrb":
More information about the grass-commit
mailing list