Explorar o código

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á %!s(int64=6) %!d(string=hai) anos
pai
achega
20752aad46
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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())
         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
     # transform a GRASS named color or an r:g:b string into a wx.Colour tuple
     else:
     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)
         color = wx.Colour(*color)
         if color.IsOk():
         if color.IsOk():
             return color
             return color