summaryrefslogtreecommitdiff
path: root/src/main/python/shapes/line.py
diff options
context:
space:
mode:
authorBlaine2020-06-18 15:43:57 +0530
committerBlaine2020-06-18 15:43:57 +0530
commitc0c5fe6186ca5776c9ff8199b88c13c2ad0e72a8 (patch)
tree51147c3cb4c97a6a1fb59605dd9860c7645c943d /src/main/python/shapes/line.py
parent384bdf5f033ba1453efdbb8baf43cdaa9049c9df (diff)
downloadChemical-PFD-c0c5fe6186ca5776c9ff8199b88c13c2ad0e72a8.tar.gz
Chemical-PFD-c0c5fe6186ca5776c9ff8199b88c13c2ad0e72a8.tar.bz2
Chemical-PFD-c0c5fe6186ca5776c9ff8199b88c13c2ad0e72a8.zip
save fileupdate
Diffstat (limited to 'src/main/python/shapes/line.py')
-rw-r--r--src/main/python/shapes/line.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index 6883662..57778fa 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -292,13 +292,16 @@ class LineLabel(QGraphicsTextItem):
"text": self.toPlainText(),
"index": self.index,
"gap": self.gap,
- "pos": (self.pos().x(), self.pos().y())
+ "pos": (self.pos().x(), self.pos().y()),
+ "values": self.values
}
def __setstate__(self, dict):
self.setPlainText(dict['text'])
self.index = dict['index']
self.gap = dict['gap']
+ for key, value in dict['values']:
+ self.values[key] = value
def findIndex(line, pos):
@@ -1023,8 +1026,12 @@ class Line(QGraphicsPathItem):
"refLine": hex(id(self.refLine)) if self.refLine else 0,
"refIndex": self.refIndex,
"label": [i for i in self.label],
- "id": hex(id(self))
+ "id": hex(id(self)),
+ "startGap": self.startGap,
+ "endGap": self.endGap
}
def __setstate__(self, dict):
self.points = [QPointF(x, y) for x, y in dict["points"]]
+ self.startGap = dict['startGap']
+ self.endGap = dict['endGap']