Explorar o código

wxGUI: fix showing and hiding legend which has histogram (merge from trunk, https://trac.osgeo.org/grass/changeset/61378)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61379 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=10) %!d(string=hai) anos
pai
achega
2b64575d47
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      gui/wxpython/mapdisp/frame.py

+ 4 - 1
gui/wxpython/mapdisp/frame.py

@@ -1071,7 +1071,10 @@ class MapFrame(SingleMapFrame):
                     # replace map
                     for i, legendParam in enumerate(self.legend.cmd[1:]):
                         idx = i + 1
-                        param, val = legendParam.split('=')
+                        param_val = legendParam.split('=')
+                        if len(param_val) != 2:
+                            continue
+                        param, val = param_val
                         if param == 'rast':
                             self.legend.cmd[idx] = 'rast={rast}'.format(rast=layer.maplayer.name)
                             isMap = True