summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaine2020-06-17 19:25:56 +0530
committerBlaine2020-06-17 19:25:56 +0530
commit776c773f17632d12247a13640cc294f5dbb2fa7d (patch)
treed278f3b91a60d73163ebd21a8924c5c72126bb51
parent24ceacaf31b35ed472645a0d98415aae1db64594 (diff)
downloadChemical-PFD-776c773f17632d12247a13640cc294f5dbb2fa7d.tar.gz
Chemical-PFD-776c773f17632d12247a13640cc294f5dbb2fa7d.tar.bz2
Chemical-PFD-776c773f17632d12247a13640cc294f5dbb2fa7d.zip
minor fixes
-rw-r--r--src/main/python/shapes/shapes.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 05ac233..dbf3e9e 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -102,10 +102,14 @@ class SizeGripItem(QGraphicsPathItem):
self.setPen(QPen(QColor("black"), 0))
self.setZValue(2)
# property direction
- self._direction = orientationEnum.index(direction)
- self.m_index = index
+ self._direction = (orientationEnum.index(direction) + self.parentItem().rotation) % 4
+ self._m_index = index
@property
+ def m_index(self):
+ return (self._m_index + self.parentItem().rotation) % 4
+
+ @property
def direction(self):
"""
property that returns the current intended resize direction of the grip item object