[GRASS-SVN] r39989 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 14 00:35:17 EST 2009
Author: cmbarton
Date: 2009-12-14 00:35:17 -0500 (Mon, 14 Dec 2009)
New Revision: 39989
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
Icon shape and size for queried items matches icon shape and size used in queried map. Backport from develbranch_6 r39988
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-12-14 05:31:04 UTC (rev 39988)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-12-14 05:35:17 UTC (rev 39989)
@@ -1561,11 +1561,25 @@
str(color[1]) + ":" + \
str(color[2])
+ # icon used in vector display and its size
+ icon = ''
+ size = 0
+ vparam = self.tree.GetPyData(self.tree.layer_selected)[0]['cmd']
+ for p in vparam:
+ if '=' in p:
+ parg,pval = p.split('=')
+ if parg == 'icon': icon = pval
+ elif parg == 'size': size = int(pval)
+
pattern = ["d.vect",
"map=%s" % name,
"color=%s" % colorStr,
"fcolor=%s" % colorStr,
"width=%d" % UserSettings.Get(group='atm', key='highlight', subkey='width')]
+ if icon != '':
+ pattern.append('icon=%s' % icon)
+ if size > 0:
+ pattern.append('size=%i' % size)
if useId:
cmd = pattern
More information about the grass-commit
mailing list