summaryrefslogtreecommitdiff
path: root/src/main/python/shapes
diff options
context:
space:
mode:
authorBlaine2020-06-09 11:08:32 +0530
committerBlaine2020-06-09 11:08:32 +0530
commit3ea92365befd56852288fdaac5d551c4b96d269a (patch)
tree1471d88a2b8496785912a35ea497a0963b896676 /src/main/python/shapes
parent994a0f5c1fb80d0065b8fd3134111ca8790b46bd (diff)
downloadChemical-PFD-3ea92365befd56852288fdaac5d551c4b96d269a.tar.gz
Chemical-PFD-3ea92365befd56852288fdaac5d551c4b96d269a.tar.bz2
Chemical-PFD-3ea92365befd56852288fdaac5d551c4b96d269a.zip
2nd fix
Diffstat (limited to 'src/main/python/shapes')
-rw-r--r--src/main/python/shapes/shapes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 2da1ca0..a795f6a 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -316,9 +316,9 @@ class NodeItem(QGraphicsSvgItem):
# set a common renderer for all svg
renderer = QSvgRenderer(fileImporter(f'svg/ellipse.svg'))
- def __init__(self, unitOperationType, parent=None):
+ def __init__(self, unitOperationType=None, parent=None):
QGraphicsSvgItem.__init__(self, parent)
- self.m_type = unitOperationType
+ self.m_type = str(unitOperationType)
self.id = None
# self.m_renderer = QSvgRenderer("svg/" + unitOperationType + ".svg")
# self.m_renderer = QSvgRenderer(fileImporter(f'svg/{unitOperationType}.svg'))
@@ -504,7 +504,7 @@ class NodeItem(QGraphicsSvgItem):
"_classname_": self.__class__.__name__,
"width": self.width,
"height": self.height,
- "pos": (self.pos.x(), self.pos.y())
+ "pos": (self.pos().x(), self.pos().y())
}
def __setstate__(self, dict):