[GRASS-SVN] r61378 - grass/trunk/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 23 12:09:13 PDT 2014


Author: annakrat
Date: 2014-07-23 12:09:13 -0700 (Wed, 23 Jul 2014)
New Revision: 61378

Modified:
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix showing and hiding legend which has histogram

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2014-07-23 18:57:42 UTC (rev 61377)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2014-07-23 19:09:13 UTC (rev 61378)
@@ -1090,7 +1090,10 @@
                     # 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



More information about the grass-commit mailing list