Browse Source

wxGUI: fix for wxPython 4 deprecated function

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73255 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 6 years ago
parent
commit
8cb9d623c9
1 changed files with 6 additions and 0 deletions
  1. 6 0
      gui/wxpython/gui_core/wrap.py

+ 6 - 0
gui/wxpython/gui_core/wrap.py

@@ -330,6 +330,12 @@ class PseudoDC(wx.adv.PseudoDC if wxPythonPhoenix else wx.PseudoDC):
     def __init__(self, *args, **kwargs):
         super(PseudoDC, self).__init__(*args, **kwargs)
 
+    def DrawLinePoint(self, pt1, pt2):
+        if wxPythonPhoenix:
+            super(PseudoDC, self).DrawLine(pt1, pt2)
+        else:
+            super(PseudoDC, self).DrawLinePoint(pt1, pt2)
+
     def DrawRectangleRect(self, rect):
         if wxPythonPhoenix:
             super(PseudoDC, self).DrawRectangle(rect=rect)