diff options
author | pravindalve | 2021-04-17 14:28:10 +0530 |
---|---|---|
committer | pravindalve | 2021-04-17 14:28:10 +0530 |
commit | a26b332427b3f871bd11162c0b8d109656bef0d1 (patch) | |
tree | 799ef67d6f3815da0197b537049dd680eb5083d8 | |
parent | b01dafa5b160e5fa2e15e829e14bd9277d729243 (diff) | |
download | Chemical-Simulator-GUI-a26b332427b3f871bd11162c0b8d109656bef0d1.tar.gz Chemical-Simulator-GUI-a26b332427b3f871bd11162c0b8d109656bef0d1.tar.bz2 Chemical-Simulator-GUI-a26b332427b3f871bd11162c0b8d109656bef0d1.zip |
Fixes for issue #17
-rw-r--r-- | Container.py | 1 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMaterialStream.py | 21 | ||||
-rw-r--r-- | Graphics.py | 1 | ||||
-rw-r--r-- | Streams.py | 2 | ||||
-rw-r--r-- | Undo.dat | bin | 28961 -> 3458 bytes | |||
-rw-r--r-- | UnitOperations.py | 2 |
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): ''' @@ -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: Binary files differdiff --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':''} } |