summaryrefslogtreecommitdiff
path: root/src/main/python/shapes/shapes.py
diff options
context:
space:
mode:
authorBlaine2020-06-20 14:43:57 +0530
committerBlaine2020-06-20 14:43:57 +0530
commitf8519766d7f7fc70180411f912ed8ca15abb6a95 (patch)
tree97eb7e5570b43f3fc10628d37360351330e16bf3 /src/main/python/shapes/shapes.py
parent7ff2d30a1c16216f3bfaebc8f71924d6a6f8ec8d (diff)
downloadChemical-PFD-f8519766d7f7fc70180411f912ed8ca15abb6a95.tar.gz
Chemical-PFD-f8519766d7f7fc70180411f912ed8ca15abb6a95.tar.bz2
Chemical-PFD-f8519766d7f7fc70180411f912ed8ca15abb6a95.zip
refactor and comment code
Diffstat (limited to 'src/main/python/shapes/shapes.py')
-rw-r--r--src/main/python/shapes/shapes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index ca6490c..5876f6e 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -12,6 +12,7 @@ from PyQt5.QtWidgets import (QGraphicsColorizeEffect, QGraphicsEllipseItem,
from .line import Line, findIndex
from utils.app import fileImporter
+# enum for all directions for line grip items
directionsEnum = [
"top",
"right",
@@ -19,6 +20,7 @@ directionsEnum = [
"left"
]
+# orientation enum for size grip items
orientationEnum = [
Qt.Horizontal,
Qt.Vertical
@@ -469,6 +471,7 @@ class NodeItem(QGraphicsSvgItem):
return self.flipState[1]
def updateTransformation(self):
+ # update transformation on flipstate or rotation change
transform = QTransform()
h = -1 if self.flipH else 1
w = -1 if self.flipV else 1