Преглед изворни кода

wxGUI: fix unexpected type float error with Python 3.10 (#2030)

Anna Petrasova пре 3 година
родитељ
комит
ac58d87df2
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      gui/wxpython/mapwin/buffered.py

+ 2 - 2
gui/wxpython/mapwin/buffered.py

@@ -1780,8 +1780,8 @@ class BufferedMapWindow(MapWindowBase, Window):
         w = self.Map.region["center_easting"] - (self.Map.width / 2) * res
         n = self.Map.region["center_northing"] + (self.Map.height / 2) * res
 
-        x = (east - w) / res
-        y = (n - north) / res
+        x = round((east - w) / res)
+        y = round((n - north) / res)
 
         return (x, y)