[GRASS-SVN] r59550 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 2 05:07:29 PDT 2014


Author: annakrat
Date: 2014-04-02 05:07:28 -0700 (Wed, 02 Apr 2014)
New Revision: 59550

Modified:
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: fix r.colors dropdown to show at least names when it can't find the thumbnails

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2014-04-02 03:56:42 UTC (rev 59549)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2014-04-02 12:07:28 UTC (rev 59550)
@@ -1290,8 +1290,11 @@
         bitmap = self.GetPictureBitmap(self.GetString(item))
         if bitmap:
             dc.DrawBitmap(bitmap, r.x, r.y + (r.height - bitmap.GetHeight()) / 2)
+            width = bitmap.GetWidth() + 10
+        else:
+            width = 0
         dc.DrawText(self.GetString(item),
-                    r.x + bitmap.GetWidth() + 10,
+                    r.x + width,
                     (r.y + 0) + (r.height - dc.GetCharHeight()) / 2)
 
     def OnMeasureItem(self, item):



More information about the grass-commit mailing list