Browse Source

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

Anna Petrasova 3 năm trước cách đây
mục cha
commit
ac58d87df2
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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)