[GRASS-SVN] r59551 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 2 05:09:45 PDT 2014
Author: annakrat
Date: 2014-04-02 05:09:45 -0700 (Wed, 02 Apr 2014)
New Revision: 59551
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: fix r.colors dropdown to show at least names when it can't find the thumbnails (merged from trunk, r59550)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/widgets.py 2014-04-02 12:07:28 UTC (rev 59550)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/widgets.py 2014-04-02 12:09:45 UTC (rev 59551)
@@ -1279,8 +1279,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