Pārlūkot izejas kodu

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

Tomas Zigo 4 gadi atpakaļ
vecāks
revīzija
8ca5c48901
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      gui/wxpython/psmap/frame.py

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

@@ -1981,10 +1981,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()