summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsumit2020-05-20 07:42:26 +0530
committersumit2020-05-20 07:42:26 +0530
commitcac1ceb55b5369fa2d5bef4f96092e594cf87881 (patch)
treea83a1cad67c22bbdaf4e84f0de0cde08296a3918 /src
parent4e62e7d565eb3932165c23bd1124817b0469b870 (diff)
downloadChemical-PFD-cac1ceb55b5369fa2d5bef4f96092e594cf87881.tar.gz
Chemical-PFD-cac1ceb55b5369fa2d5bef4f96092e594cf87881.tar.bz2
Chemical-PFD-cac1ceb55b5369fa2d5bef4f96092e594cf87881.zip
cleanup
Diffstat (limited to 'src')
-rw-r--r--src/main/python/shapes/shapes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 034220e..c0ddb0f 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -320,22 +320,22 @@ class NodeItem(QGraphicsSvgItem):
else:
self.hideGripItem()
- def resize(self, index, p):
+ def resize(self, index, new_pos):
"""Move grip item with changing rect of node item
"""
x = self.boundingRect().x()
y = self.boundingRect().y()
width = self.boundingRect().width()
height = self.boundingRect().height()
- pos_new = self.sizeGripItems[index].pos()
+ old_pos = self.sizeGripItems[index].pos()
self.prepareGeometryChange()
if index == 0 or index == 1:
- self.rect = QRectF(x + p.x() - pos_new.x(), y + p.y() - pos_new.y(), width - p.x() + pos_new.x(),
- height - p.y() + pos_new.y())
+ self.rect = QRectF(x + new_pos.x() - old_pos.x(), y + new_pos.y() - old_pos.y(), width - new_pos.x() + old_pos.x(),
+ height - new_pos.y() + old_pos.y())
if index == 2 or index == 3:
- self.rect = QRectF(x, y, width + p.x() - pos_new.x(), height + p.y() - pos_new.y())
+ self.rect = QRectF(x, y, width + new_pos.x() - old_pos.x(), height + new_pos.y() - old_pos.y())
self.updateSizeGripItem([index])
self.updateLineGripItem()