diff options
author | sumit | 2020-05-19 20:31:36 +0530 |
---|---|---|
committer | sumit | 2020-05-19 20:31:36 +0530 |
commit | 4e62e7d565eb3932165c23bd1124817b0469b870 (patch) | |
tree | 28b2f3a2d7f3dce096357cfbc2531684b9faea5f /src/main | |
parent | 238cedcd7e834d859fb948d3d3e289c64133596e (diff) | |
download | Chemical-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.py | 16 |
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): |