浏览代码

wxGUI/g.gui.psmap: fix move line object error message (#1031)

Tomas Zigo 4 年之前
父节点
当前提交
a090b3a48a
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      gui/wxpython/psmap/frame.py

+ 4 - 4
gui/wxpython/psmap/frame.py

@@ -1979,10 +1979,10 @@ class PsMapBufferedWindow(wx.Window):
                 yDiff = newRect[1] - oldRect[1]
                 yDiff = newRect[1] - oldRect[1]
                 self.instruction[id]['rect'] = newRect
                 self.instruction[id]['rect'] = newRect
 
 
-                point1 = wx.Point2D(
-                    xDiff, yDiff) + self.instruction[id]['where'][0]
-                point2 = wx.Point2D(
-                    xDiff, yDiff) + self.instruction[id]['where'][1]
+                point1 = wx.Point2D(*self.instruction[id]['where'][0])
+                point2 = wx.Point2D(*self.instruction[id]['where'][1])
+                point1 += wx.Point2D(xDiff, yDiff)
+                point2 += wx.Point2D(xDiff, yDiff)
                 self.instruction[id]['where'] = [point1, point2]
                 self.instruction[id]['where'] = [point1, point2]
 
 
                 self.RecalculateEN()
                 self.RecalculateEN()