diff options
Diffstat (limited to 'src/main/python/shapes/shapes.py')
-rw-r--r-- | src/main/python/shapes/shapes.py | 8 |
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 |