[GRASS-SVN] r73404 - grass/trunk/gui/wxpython/psmap

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 25 18:08:44 PDT 2018


Author: annakrat
Date: 2018-09-25 18:08:44 -0700 (Tue, 25 Sep 2018)
New Revision: 73404

Modified:
   grass/trunk/gui/wxpython/psmap/utils.py
Log:
wxGUI: fix for wxPython 4, see #3621

Modified: grass/trunk/gui/wxpython/psmap/utils.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/utils.py	2018-09-25 22:14:09 UTC (rev 73403)
+++ grass/trunk/gui/wxpython/psmap/utils.py	2018-09-26 01:08:44 UTC (rev 73404)
@@ -175,9 +175,9 @@
         return str(rgb.Red()) + ':' + str(rgb.Green()) + ':' + str(rgb.Blue())
     # transform a GRASS named color or an r:g:b string into a wx.Colour tuple
     else:
-        color = (grass.parse_color(rgb)[0] * 255,
-                 grass.parse_color(rgb)[1] * 255,
-                 grass.parse_color(rgb)[2] * 255)
+        color = (int(grass.parse_color(rgb)[0] * 255),
+                 int(grass.parse_color(rgb)[1] * 255),
+                 int(grass.parse_color(rgb)[2] * 255))
         color = wx.Colour(*color)
         if color.IsOk():
             return color



More information about the grass-commit mailing list