Parcourir la source

Icon shape and size for queried items matches icon shape and size used in queried map. Backport from develbranch_6 https://trac.osgeo.org/grass/changeset/39988

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39989 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton il y a 15 ans
Parent
commit
16e5f414b0
1 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 14 0
      gui/wxpython/gui_modules/mapdisp.py

+ 14 - 0
gui/wxpython/gui_modules/mapdisp.py

@@ -1561,11 +1561,25 @@ class MapFrame(wx.Frame):
             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