summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsumit2020-06-14 12:24:23 +0530
committersumit2020-06-14 12:24:23 +0530
commit9db65a09eb71fdbf48fe66a6f716672de3bf6e13 (patch)
tree121f2928ee2c40a354b5a5e97a7ae53795f9f759
parentb160be24a130bd0136801f75d90c111778e1d302 (diff)
downloadChemical-PFD-9db65a09eb71fdbf48fe66a6f716672de3bf6e13.tar.gz
Chemical-PFD-9db65a09eb71fdbf48fe66a6f716672de3bf6e13.tar.bz2
Chemical-PFD-9db65a09eb71fdbf48fe66a6f716672de3bf6e13.zip
fix in line to rectangle grip
-rw-r--r--src/main/python/shapes/shapes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 27f99b9..117ffb8 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -350,14 +350,14 @@ class LineGripItem(QGraphicsPathItem):
endPoint = item.parentItem().mapToScene(item.pos())
gap = 0
# restrict line to one grip
- if self.size is None and len(item.lines) > 0:
+ if item.size is None and len(item.lines) > 0:
break
# in case of rectangle grip
- if self.size and item.m_location in ["top", "bottom"]:
+ if item.size and item.m_location in ["top", "bottom"]:
mpos = self.mapToScene(mouseEvent.pos())
gap = (endPoint.x() - mpos.x()) / item.boundingRect().width()
endPoint.setX(mpos.x())
- elif self.size:
+ elif item.size:
mpos = self.mapToScene(mouseEvent.pos())
gap = (endPoint.y() - mpos.y()) / item.boundingRect().height()
endPoint.setY(mpos.y())