瀏覽代碼

wxGUI: fix for wxPython 4, see https://trac.osgeo.org/grass/ticket/3621

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73404 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 6 年之前
父節點
當前提交
20752aad46
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      gui/wxpython/psmap/utils.py

+ 3 - 3
gui/wxpython/psmap/utils.py

@@ -175,9 +175,9 @@ def convertRGB(rgb):
         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