[GRASS-SVN] r47785 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 21 06:23:28 EDT 2011
Author: martinl
Date: 2011-08-21 03:23:28 -0700 (Sun, 21 Aug 2011)
New Revision: 47785
Modified:
grass/trunk/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI/layertree: set color table also for vector maps
Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py 2011-08-19 21:17:22 UTC (rev 47784)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py 2011-08-21 10:23:28 UTC (rev 47785)
@@ -315,6 +315,10 @@
id = self.popupID['export'])
self.popupMenu.AppendSeparator()
+
+ self.popupMenu.Append(self.popupID['color'], _("Set color table"))
+ self.Bind (wx.EVT_MENU, self.OnVectorColorTable, id = self.popupID['color'])
+
self.popupMenu.Append(self.popupID['attr'], text = _("Show attribute data"))
self.Bind(wx.EVT_MENU, self.lmgr.OnShowAttributeTable, id = self.popupID['attr'])
@@ -397,7 +401,7 @@
self.popupMenu.AppendSeparator()
self.popupMenu.Append(self.popupID['color'], _("Set color table"))
- self.Bind (wx.EVT_MENU, self.OnColorTable, id = self.popupID['color'])
+ self.Bind (wx.EVT_MENU, self.OnRasterColorTable, id = self.popupID['color'])
self.popupMenu.Append(self.popupID['hist'], _("Histogram"))
self.Bind (wx.EVT_MENU, self.OnHistogram, id = self.popupID['hist'])
self.popupMenu.Append(self.popupID['univar'], _("Univariate raster statistics"))
@@ -518,11 +522,17 @@
# show new display
self.profileFrame.Show()
- def OnColorTable(self, event):
+ def OnRasterColorTable(self, event):
"""!Set color table for raster map"""
name = self.GetPyData(self.layer_selected)[0]['maplayer'].GetName()
menuform.GUI(parent = self, centreOnParent = False).ParseCommand(['r.colors',
'map=%s' % name])
+
+ def OnVectorColorTable(self, event):
+ """!Set color table for vector map"""
+ name = self.GetPyData(self.layer_selected)[0]['maplayer'].GetName()
+ menuform.GUI(parent = self, centreOnParent = False).ParseCommand(['v.colors',
+ 'map=%s' % name])
def OnHistogram(self, event):
"""
More information about the grass-commit
mailing list