Kaynağa Gözat

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

Anna Petrasova 3 yıl önce
ebeveyn
işleme
ac58d87df2
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  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)