[GRASS-SVN] r62115 - in grass/branches/releasebranch_7_0: . gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 27 13:08:27 PDT 2014


Author: annakrat
Date: 2014-09-27 13:08:27 -0700 (Sat, 27 Sep 2014)
New Revision: 62115

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: do not fail because of missing icon when running d.histogram from GUI command line (merge from trunk, r62114)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:60289,60696,61269,61380,61420,61422,61480,61500,61764,61808,61829,61831,61840,61851-61854,61858,61888,61891,61905,61907,61913-61914,61916,61918,61921,61938,61967-61968,61975,61980,61986,61993,62005,62095,62099
   + /grass/trunk:60289,60696,61269,61380,61420,61422,61480,61500,61764,61808,61829,61831,61840,61851-61854,61858,61888,61891,61905,61907,61913-61914,61916,61918,61921,61938,61967-61968,61975,61980,61986,61993,62005,62095,62099,62114

Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2014-09-27 20:06:00 UTC (rev 62114)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/layertree.py	2014-09-27 20:08:27 UTC (rev 62115)
@@ -1081,11 +1081,15 @@
             self.SetItemImage(layer, self.folder_open, CT.TreeItemIcon_Expanded)
             self.SetItemText(layer, grouptext)
         else:
-            self.SetItemImage(layer, self._icon[ltype])
-            # do not use title() - will not work with ltype == '3d-raster'
-            self.SetItemText(layer, '%s %s' % (LMIcons["layer"+ltype[0].upper()+ltype[1:]].GetLabel(),
-                                               _('(double click to set properties)') + ' ' * 15))
-            
+            if ltype in self._icon:
+                self.SetItemImage(layer, self._icon[ltype])
+                # do not use title() - will not work with ltype == '3d-raster'
+                self.SetItemText(layer, '%s %s' % (LMIcons["layer"+ltype[0].upper()+ltype[1:]].GetLabel(),
+                                                   _('(double click to set properties)') + ' ' * 15))
+            else:
+                self.SetItemImage(layer, self._icon['cmd'])
+                self.SetItemText(layer, ltype)
+
         if ltype != 'group':
             if lcmd and len(lcmd) > 1:
                 cmd = lcmd



More information about the grass-commit mailing list