summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBlaine2020-06-02 21:28:30 +0530
committerBlaine2020-06-02 21:28:30 +0530
commitab89c224340e9341bfcb79f125c10b6d2d757077 (patch)
tree60e07850e555807b0a356b0ae4eeedbb92cdd9ce /src
parentf71111e6d48a5d3a0edfd63a131c7a293c6d38d7 (diff)
downloadChemical-PFD-ab89c224340e9341bfcb79f125c10b6d2d757077.tar.gz
Chemical-PFD-ab89c224340e9341bfcb79f125c10b6d2d757077.tar.bz2
Chemical-PFD-ab89c224340e9341bfcb79f125c10b6d2d757077.zip
loop 2nd fix
Diffstat (limited to 'src')
-rw-r--r--src/main/python/shapes/line.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index e0e3fae..1c30cd9 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -213,12 +213,11 @@ class Line(QGraphicsPathItem):
bool = y2>y1
if bool:
path.lineTo(point - QPointF(0, 8))
- else:
- path.lineTo(point + QPointF(0, 8))
- path.arcTo(QRectF(x-8, y-8, 16, 16), 90, -180)
- if bool:
+ path.arcTo(QRectF(x-8, y-8, 16, 16), 90, -180)
path.moveTo(point + QPointF(0, 8))
else:
+ path.lineTo(point + QPointF(0, 8))
+ path.arcTo(QRectF(x-8, y-8, 16, 16), -90, 180)
path.moveTo(point - QPointF(0, 8))
elif y == y1 == y2:
#horizontal
@@ -226,13 +225,12 @@ class Line(QGraphicsPathItem):
bool = x2>x1
if bool:
path.lineTo(point - QPointF(8, 0))
- else:
- path.lineTo(point - QPointF(8, 0))
- path.arcTo(QRectF(x-8, y-8, 16, 16), 180, 180)
- if bool:
+ path.arcTo(QRectF(x-8, y-8, 16, 16), 180, 180)
path.moveTo(point + QPointF(8, 0))
else:
path.lineTo(point - QPointF(8, 0))
+ path.arcTo(QRectF(x-8, y-8, 16, 16), 0, -180)
+ path.lineTo(point - QPointF(8, 0))
path.lineTo(self.points[i+1])
painter.drawPath(path)