소스 검색

wxGUI: fix unnecessary rerendering when running r.colors with multiple input maps

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61501 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 년 전
부모
커밋
8ce171c24f
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      gui/wxpython/core/gconsole.py

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

@@ -661,6 +661,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: