Sfoglia il codice sorgente

wxGUI/g.gui.psmap: fix move point object error message (#1033)

Tomas Zigo 4 anni fa
parent
commit
f568b2ded5
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      gui/wxpython/psmap/frame.py

+ 3 - 1
gui/wxpython/psmap/frame.py

@@ -1965,7 +1965,9 @@ class PsMapBufferedWindow(wx.Window):
                 rect = self.pdcObj.GetIdBounds(id)
                 rect = self.pdcObj.GetIdBounds(id)
                 self.instruction[id]['rect'] = self.CanvasPaperCoordinates(
                 self.instruction[id]['rect'] = self.CanvasPaperCoordinates(
                     rect=rect, canvasToPaper=True)
                     rect=rect, canvasToPaper=True)
-                rect.OffsetXY(rect.GetWidth() / 2, rect.GetHeight() / 2)
+                rect.Offset(
+                    dx=rect.GetWidth() / 2, dy=rect.GetHeight() / 2,
+                )
                 self.instruction[id]['where'] = self.CanvasPaperCoordinates(
                 self.instruction[id]['where'] = self.CanvasPaperCoordinates(
                     rect=rect, canvasToPaper=True)[: 2]
                     rect=rect, canvasToPaper=True)[: 2]
                 self.RecalculateEN()
                 self.RecalculateEN()