summaryrefslogtreecommitdiff
path: root/src/main/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/python')
-rw-r--r--src/main/python/shapes/line.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index e6b1dd9..8c5149f 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -518,6 +518,10 @@ class Line(QGraphicsPathItem):
updates points of line when grabber is moved
:return:
"""
+ if self.startGripItem:
+ self.points[0]= self.startPoint
+ if self.endGripItem:
+ self.points[len(self.points) - 1] = self.endPoint
if self.startGripItem.m_location in ["left", "right"]:
point = self.points[1]
self.points[1] = QPointF(point.x(), self.startPoint.y())
@@ -527,7 +531,6 @@ class Line(QGraphicsPathItem):
else:
point = self.points[len(self.points) - 2]
self.points[len(self.points) - 2] = QPointF(self.endPoint.x(), point.y())
-
else:
point = self.points[1]
self.points[1] = QPointF(self.startPoint.x(), point.y())
@@ -538,6 +541,7 @@ class Line(QGraphicsPathItem):
point = self.points[len(self.points) - 2]
self.points[len(self.points) - 2] = QPointF(self.endPoint.x(), point.y())
+
def shape(self):
"""generates outline for path
"""