summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-01-24 15:41:13 +0530
committerbrenda-br2023-01-24 15:41:13 +0530
commit380010f100ec1d9a40f2c94e41a21d23da579b2e (patch)
tree8d646005263cb54dff082ed52876070ce95707cb
parentefd125c443e71cc4c548b1045cfa56149ae1d055 (diff)
downloadChemical-Simulator-GUI-380010f100ec1d9a40f2c94e41a21d23da579b2e.tar.gz
Chemical-Simulator-GUI-380010f100ec1d9a40f2c94e41a21d23da579b2e.tar.bz2
Chemical-Simulator-GUI-380010f100ec1d9a40f2c94e41a21d23da579b2e.zip
Fix #43 Material Stream adding new compounds
-rw-r--r--ComponentSelector.py4
-rw-r--r--DockWidgets/DockWidgetMaterialStream.py1
-rw-r--r--DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pycbin9214 -> 9127 bytes
-rw-r--r--Graphics.py2
4 files changed, 6 insertions, 1 deletions
diff --git a/ComponentSelector.py b/ComponentSelector.py
index 60498cc..56c6078 100644
--- a/ComponentSelector.py
+++ b/ComponentSelector.py
@@ -173,4 +173,8 @@ class ComponentSelector(QDialog,ui_dialog):
self.f_mo.write('\n')
self.f_mo.write('\nend database;')
self.f_mo.close()
+
+ def accept(self):
+ #self.parent().container.update_compounds()
+ return super().accept()
\ No newline at end of file
diff --git a/DockWidgets/DockWidgetMaterialStream.py b/DockWidgets/DockWidgetMaterialStream.py
index 3c8a90f..64545be 100644
--- a/DockWidgets/DockWidgetMaterialStream.py
+++ b/DockWidgets/DockWidgetMaterialStream.py
@@ -128,6 +128,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog):
indexx = self.comboBox.currentIndex()
self.comboBox.setCurrentIndex(1)
self.comboBox.setCurrentIndex(indexx)
+ self.obj.init_variables()
except Exception as e:
print(e)
diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
index 9d94e09..c4f7e2f 100644
--- a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
Binary files differ
diff --git a/Graphics.py b/Graphics.py
index 1472516..c527205 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -39,7 +39,7 @@ class Graphics(QDialog, QtWidgets.QGraphicsItem):
return NodeItem(unit_operation, container, self.graphicsView)
def update_compounds(self):
- for i in self.scene.items():
+ for i in self.graphicsView.items():
if isinstance(i, NodeItem):
i.update_compounds()