summaryrefslogtreecommitdiff
path: root/Graphics.py
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics.py')
-rw-r--r--Graphics.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Graphics.py b/Graphics.py
index a9a6d23..8fbbbf0 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -36,6 +36,11 @@ class Graphics(QDialog, QtWidgets.QGraphicsItem):
def create_node_item(self,unit_operation, container):
return NodeItem(unit_operation, container, self.graphicsView)
+
+ def update_compounds(self):
+ for i in self.scene.items():
+ if isinstance(i, NodeItem):
+ i.update_compounds()
def load_canvas(self, obj, container):
stm = ['MaterialStream','EngStm']
@@ -581,6 +586,13 @@ class NodeItem(QtWidgets.QGraphicsItem):
default_tooltip = default_tooltip + f" {i} : {j}\n"
self.setToolTip(default_tooltip)
+ def update_compounds(self):
+ try:
+ self.obj.update_compounds()
+ self.dock_widget.update_compounds()
+ except AttributeError:
+ pass
+
def findMainWindow(self):
'''