瀏覽代碼

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

Tomas Zigo 4 年之前
父節點
當前提交
f568b2ded5
共有 1 個文件被更改,包括 3 次插入1 次删除
  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)
                 self.instruction[id]['rect'] = self.CanvasPaperCoordinates(
                     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(
                     rect=rect, canvasToPaper=True)[: 2]
                 self.RecalculateEN()