[GRASS-SVN] r39988 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 14 00:31:05 EST 2009


Author: cmbarton
Date: 2009-12-14 00:31:04 -0500 (Mon, 14 Dec 2009)
New Revision: 39988

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
Log:
Icon shape and size for queried items matches icon shape and size used in queried map.

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2009-12-14 05:21:56 UTC (rev 39987)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2009-12-14 05:31:04 UTC (rev 39988)
@@ -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