diff options
author | sumit | 2020-06-02 13:12:03 +0530 |
---|---|---|
committer | sumit | 2020-06-02 13:12:03 +0530 |
commit | 482455785986a00f66ccd764f2c4e3732ef30529 (patch) | |
tree | d3404936525a9fa9955cec048c781dca5932b487 /src/main/python/shapes | |
parent | 1a61fee7bd6038489a14fadc268dec663c50eb42 (diff) | |
download | Chemical-PFD-482455785986a00f66ccd764f2c4e3732ef30529.tar.gz Chemical-PFD-482455785986a00f66ccd764f2c4e3732ef30529.tar.bz2 Chemical-PFD-482455785986a00f66ccd764f2c4e3732ef30529.zip |
update end point of line
Diffstat (limited to 'src/main/python/shapes')
-rw-r--r-- | src/main/python/shapes/line.py | 6 |
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 """ |