From 9db65a09eb71fdbf48fe66a6f716672de3bf6e13 Mon Sep 17 00:00:00 2001 From: sumit Date: Sun, 14 Jun 2020 12:24:23 +0530 Subject: fix in line to rectangle grip --- src/main/python/shapes/shapes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/python/shapes/shapes.py') 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()) -- cgit