summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Container.py1
-rw-r--r--DockWidgets/DockWidgetMaterialStream.py21
-rw-r--r--Graphics.py1
-rw-r--r--Streams.py2
-rw-r--r--Undo.datbin28961 -> 3458 bytes
-rw-r--r--UnitOperations.py2
6 files changed, 19 insertions, 8 deletions
diff --git a/Container.py b/Container.py
index 397aaf0..0ad3c50 100644
--- a/Container.py
+++ b/Container.py
@@ -148,6 +148,7 @@ class Container():
DockWidget.show_result(NodeItem.get_dock_widget())
+
# for i in self.graphics.scene.items():
# if (isinstance(i, NodeItem)):
# i.update_tooltip()
diff --git a/DockWidgets/DockWidgetMaterialStream.py b/DockWidgets/DockWidgetMaterialStream.py
index 31b874e..bfdb22e 100644
--- a/DockWidgets/DockWidgetMaterialStream.py
+++ b/DockWidgets/DockWidgetMaterialStream.py
@@ -150,8 +150,8 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog):
self.init()
@staticmethod
- def show_result(lst):
- for i in lst:
+ def show_result(ms_lst):
+ for i in ms_lst:
i.results_category(i.name)
def clear_results(self):
@@ -171,7 +171,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog):
d = {"Mole Fraction":"x_pc", "Mass Fraction":"xm_pc", "Mole Flow":"F_pc", "Mass Flow":"Fm_pc"}
- lst = list(d.keys())
+ ms_lst = list(d.keys())
klst = list(d.values())
p = {"Pressure":"P", "Temperature":"T","Vapour Phase Mole Fraction":"xvap", "Phase Molar Enthalpy":"H_p",
@@ -207,9 +207,9 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog):
obj.variables[k.split('.')[1]]['value'] = resultval
if namee not in k:
- mroot = QTreeWidgetItem(self.mTreeWidget, [lst[j]])
- lroot = QTreeWidgetItem(self.lTreeWidget, [lst[j]])
- vroot = QTreeWidgetItem(self.vTreeWidget, [lst[j]])
+ mroot = QTreeWidgetItem(self.mTreeWidget, [ms_lst[j]])
+ lroot = QTreeWidgetItem(self.lTreeWidget, [ms_lst[j]])
+ vroot = QTreeWidgetItem(self.vTreeWidget, [ms_lst[j]])
namee = klst[j]
phase_no = int(k[k.index(',') - 1]) # phase no is from modelica list
@@ -307,7 +307,16 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog):
self.comboBox.setCurrentIndex(1)
self.comboBox.setCurrentIndex(indexx)
+ try:
+ for i in self.parent().container.graphics.graphicsView.items():
+ try:
+ if i.obj == self.obj:
+ i.update_tooltip()
+ except Exception as e:
+ pass
+ except Exception as e:
+ print(e)
except Exception as e:
diff --git a/Graphics.py b/Graphics.py
index 3660f25..950b1fc 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -580,6 +580,7 @@ class NodeItem(QtWidgets.QGraphicsItem):
if j is not None:
default_tooltip = default_tooltip + f" {i} : {j}\n"
self.setToolTip(default_tooltip)
+
def findMainWindow(self):
'''
diff --git a/Streams.py b/Streams.py
index 4127945..efc7428 100644
--- a/Streams.py
+++ b/Streams.py
@@ -163,7 +163,7 @@ class MaterialStream():
if self.variables['x_pc']['value']:
self.eqn_dict['x_pc[1,:]'] = x_pc
if self.variables['F_pc']['value']:
- self.eqn_dict['F_p[1]'] = self.variables['F_pc']['value']
+ self.eqn_dict['F_p[1]'] = self.variables['F_p[1]']['value']
def get_start_values(self):
try:
diff --git a/Undo.dat b/Undo.dat
index 1dfd91c..3684b24 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ
diff --git a/UnitOperations.py b/UnitOperations.py
index 0caf2bc..f15d7d6 100644
--- a/UnitOperations.py
+++ b/UnitOperations.py
@@ -567,7 +567,7 @@ class Splitter(UnitOperation):
type(self).counter += 1
self.variables = {
- 'No' : {'name':'No. of Output', 'value':3, 'unit':''},
+ 'No' : {'name':'No. of Output', 'value':2, 'unit':''},
'CalcType' : {'name':'Calculation Type', 'value':self.CalcType_modes[0], 'unit':''},
'SpecVal_s' : {'name':'Specification Value', 'value':[0.5,0.5], 'unit':''}
}