Selaa lähdekoodia

wxGUI/nviz: fix failed map centring on mac with pre-wx4.1 (#895)

nilason 4 vuotta sitten
vanhempi
commit
4a972d07cb
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      gui/wxpython/nviz/mapwindow.py

+ 5 - 0
gui/wxpython/nviz/mapwindow.py

@@ -247,6 +247,11 @@ class GLWindow(MapWindowBase, glcanvas.GLCanvas):
                         "and restart GUI.")
             GMessage(message)
 
+    def GetContentScaleFactor(self):
+        if sys.platform == "darwin" and not CheckWxVersion(version=[4, 1, 0]):
+            return 1
+        return super().GetContentScaleFactor()
+
     def InitFly(self):
         """Initialize fly through dictionary"""
         fly = {'interval': 10,             # interval for timerFly