diff options
author | Blaine | 2020-06-18 15:59:40 +0530 |
---|---|---|
committer | Blaine | 2020-06-18 15:59:40 +0530 |
commit | 85a2d6f42168a9e693b7649b979b86f7a94d6ca3 (patch) | |
tree | 64330f423c94f9281d877fab30c9e1d40bf5a25a /src/main/python/utils | |
parent | c0c5fe6186ca5776c9ff8199b88c13c2ad0e72a8 (diff) | |
download | Chemical-PFD-85a2d6f42168a9e693b7649b979b86f7a94d6ca3.tar.gz Chemical-PFD-85a2d6f42168a9e693b7649b979b86f7a94d6ca3.tar.bz2 Chemical-PFD-85a2d6f42168a9e693b7649b979b86f7a94d6ca3.zip |
save update 2
Diffstat (limited to 'src/main/python/utils')
-rw-r--r-- | src/main/python/utils/canvas.py | 4 | ||||
-rw-r--r-- | src/main/python/utils/streamTable.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/python/utils/canvas.py b/src/main/python/utils/canvas.py index e492878..ad8981d 100644 --- a/src/main/python/utils/canvas.py +++ b/src/main/python/utils/canvas.py @@ -143,7 +143,7 @@ class canvas(customView): "symbols": [i for i in self.painter.items() if isinstance(i, shapes.NodeItem)], "lines": sorted([i for i in self.painter.items() if isinstance(i, shapes.Line)], key = lambda x: 1 if x.refLine else 0), "landscape": self.landscape, - "streamTable": [self.streamTable, (self.streamTableRect.pos().x(), self.streamTable.pos().y())] if self.streamTable else False + "streamTable": [self.streamTable, (self.streamTableRect.pos().x(), self.streamTableRect.pos().y())] if self.streamTable else False } def __setstate__(self, dict): @@ -165,6 +165,7 @@ class canvas(customView): graphicLabel = shapes.ItemLabel(pos = QPointF(*item['label']['pos']), parent = graphic) graphicLabel.__setstate__(item['label']) self.painter.addItem(graphicLabel) + graphic.rotation = item['rotation'] for item in dict['lines']: line = shapes.Line(QPointF(*item['startPoint']), QPointF(*item['endPoint'])) @@ -189,6 +190,7 @@ class canvas(customView): self.painter.addItem(labelItem) line.updateLine() line.addGrabber() + print(line.startGripItem) if dict['streamTable']: table = streamTable(self.labelItems, self) diff --git a/src/main/python/utils/streamTable.py b/src/main/python/utils/streamTable.py index 52b62c1..b397016 100644 --- a/src/main/python/utils/streamTable.py +++ b/src/main/python/utils/streamTable.py @@ -155,7 +155,7 @@ class streamTable(QTableView): } def __setstate__(self, dict): - for key, value in dict['borderThickness']: + for key, value in dict['borderThickness'].items(): self.borderThickness[key] = value self.model.header = dict['header'] self.repaint() |