summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorsumit2020-05-19 20:31:36 +0530
committersumit2020-05-19 20:31:36 +0530
commit4e62e7d565eb3932165c23bd1124817b0469b870 (patch)
tree28b2f3a2d7f3dce096357cfbc2531684b9faea5f /src/main
parent238cedcd7e834d859fb948d3d3e289c64133596e (diff)
downloadChemical-PFD-4e62e7d565eb3932165c23bd1124817b0469b870.tar.gz
Chemical-PFD-4e62e7d565eb3932165c23bd1124817b0469b870.tar.bz2
Chemical-PFD-4e62e7d565eb3932165c23bd1124817b0469b870.zip
clean up'
Diffstat (limited to 'src/main')
-rw-r--r--src/main/python/shapes/shapes.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 982e882..034220e 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -320,24 +320,24 @@ class NodeItem(QGraphicsSvgItem):
else:
self.hideGripItem()
- def resize(self, i, p):
+ def resize(self, index, p):
"""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()
- p_new = self.sizeGripItems[i].pos()
+ pos_new = self.sizeGripItems[index].pos()
self.prepareGeometryChange()
- if i == 0 or i == 1:
- self.rect = QRectF(x + p.x() - p_new.x(), y + p.y() - p_new.y(), width - p.x() + p_new.x(),
- height - p.y() + p_new.y())
+ 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())
- if i == 2 or i == 3:
- self.rect = QRectF(x, y, width + p.x() - p_new.x(), height + p.y() - p_new.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.updateSizeGripItem([i])
+ self.updateSizeGripItem([index])
self.updateLineGripItem()
def addGripItem(self):