Browse Source

wxGUI: fix unnecessary rerendering when running r.colors with multiple input maps (merge from trunk, https://trac.osgeo.org/grass/changeset/61501)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61502 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 years ago
parent
commit
1ec469e456
1 changed files with 4 additions and 0 deletions
  1. 4 0
      gui/wxpython/core/gconsole.py

+ 4 - 0
gui/wxpython/core/gconsole.py

@@ -657,6 +657,10 @@ class GConsole(wx.EvtHandler):
                     # if multiple maps (e.g. r.series.interp), we need add each
                     # if multiple maps (e.g. r.series.interp), we need add each
                     if p.get('multiple', False):
                     if p.get('multiple', False):
                         lnames = p.get('value').split(',')
                         lnames = p.get('value').split(',')
+                        # in case multiple input (old) maps in r.colors
+                        # we don't want to rerender it multiple times! just once
+                        if p.get('age', 'old') == 'old':
+                            lnames = lnames[0:1]
                     else:
                     else:
                         lnames = [p.get('value')]
                         lnames = [p.get('value')]
                     for lname in lnames:
                     for lname in lnames: