diff options
author | pravindalve | 2023-02-07 13:04:01 +0530 |
---|---|---|
committer | GitHub | 2023-02-07 13:04:01 +0530 |
commit | 651b94f869dde8c3ca75fd1a0e41c32bc01c240d (patch) | |
tree | 26a78391fbd38db78e4f3f2a242c7639c3081c56 /DockWidgets | |
parent | e10e1eebbf6927d5548ccb7bbb6563994cee0c35 (diff) | |
parent | f53af896c241d0628625452ef66f4a7255ec2846 (diff) | |
download | Chemical-Simulator-GUI-651b94f869dde8c3ca75fd1a0e41c32bc01c240d.tar.gz Chemical-Simulator-GUI-651b94f869dde8c3ca75fd1a0e41c32bc01c240d.tar.bz2 Chemical-Simulator-GUI-651b94f869dde8c3ca75fd1a0e41c32bc01c240d.zip |
Merge pull request #46 from brenda-br/Fix-35
Fix 27, 31, 32, 44, 45, 47, 48, 49, 50
Diffstat (limited to 'DockWidgets')
17 files changed, 39 insertions, 14 deletions
diff --git a/DockWidgets/DockWidget.py b/DockWidgets/DockWidget.py index cc222db..71e9624 100644 --- a/DockWidgets/DockWidget.py +++ b/DockWidgets/DockWidget.py @@ -90,7 +90,7 @@ class DockWidget(QDockWidget,ui_dialog): self.show_error() break - print("param ", self.dict) + #print("param ", self.dict) self.obj.param_setter(self.dict) for i in self.container.graphics.graphicsView.items(): try: @@ -98,7 +98,9 @@ class DockWidget(QDockWidget,ui_dialog): i.update_tooltip() except: pass - + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -155,4 +157,4 @@ class DockWidget(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetCompoundSeparator.py b/DockWidgets/DockWidgetCompoundSeparator.py index 8fcee39..57b1339 100644 --- a/DockWidgets/DockWidgetCompoundSeparator.py +++ b/DockWidgets/DockWidgetCompoundSeparator.py @@ -113,6 +113,9 @@ class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -120,4 +123,4 @@ class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetCompressorExpander.py b/DockWidgets/DockWidgetCompressorExpander.py index cd0135c..e8e2b31 100644 --- a/DockWidgets/DockWidgetCompressorExpander.py +++ b/DockWidgets/DockWidgetCompressorExpander.py @@ -107,7 +107,9 @@ class DockWidgetCompressorExpander(QDockWidget,ui_dialog): i.update_tooltip() except: pass - + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -154,4 +156,4 @@ class DockWidgetCompressorExpander(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetDistillationColumn.py b/DockWidgets/DockWidgetDistillationColumn.py index 716cb1a..e2e1031 100644 --- a/DockWidgets/DockWidgetDistillationColumn.py +++ b/DockWidgets/DockWidgetDistillationColumn.py @@ -179,6 +179,9 @@ class DockWidgetDistillationColumn(QDockWidget, ui_dialog): print("param ", self.dict) self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -361,4 +364,4 @@ class DockWidgetDistillationColumn(QDockWidget, ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetFlash.py b/DockWidgets/DockWidgetFlash.py index c288259..c75f950 100644 --- a/DockWidgets/DockWidgetFlash.py +++ b/DockWidgets/DockWidgetFlash.py @@ -65,6 +65,9 @@ class DockWidgetFlash(QDockWidget,ui_dialog): self.dict = [self.input_dict[0].currentText(),self.input_dict[1].isChecked(), float(self.input_dict[2].text()), self.input_dict[3].isChecked(), float(self.input_dict[4].text())] print("param ", self.dict) self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -73,4 +76,4 @@ class DockWidgetFlash(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetMaterialStream.py b/DockWidgets/DockWidgetMaterialStream.py index 64545be..a6396ef 100644 --- a/DockWidgets/DockWidgetMaterialStream.py +++ b/DockWidgets/DockWidgetMaterialStream.py @@ -174,7 +174,9 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): i.update_tooltip() except: pass - + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -209,7 +211,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): klst = list(d.values()) p = {"Pressure":"P", "Temperature":"T","Vapour Phase Mole Fraction":"xvap", "Phase Molar Enthalpy":"H_p", - "Phase Molar Entropy":"S_p", "Molar Flow Rate":"F_p"} + "Phase Molar Entropy":"S_p", "Molar Flow Rate":"F_p","Mass Flow Rate":"Fm_p"} # Amounts Tab if obj.type == 'MaterialStream': @@ -358,4 +360,5 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) +
\ No newline at end of file diff --git a/DockWidgets/DockWidgetMixer.py b/DockWidgets/DockWidgetMixer.py index 748ef4f..2d02f8c 100644 --- a/DockWidgets/DockWidgetMixer.py +++ b/DockWidgets/DockWidgetMixer.py @@ -46,6 +46,9 @@ class DockWidgetMixer(QDockWidget,ui_dialog): self.dict={} self.dict = [int(self.input_dict[0].text()), self.input_dict[1].currentText()] self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -53,4 +56,4 @@ class DockWidgetMixer(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetShortcutColumn.py b/DockWidgets/DockWidgetShortcutColumn.py index efb044a..9b65021 100644 --- a/DockWidgets/DockWidgetShortcutColumn.py +++ b/DockWidgets/DockWidgetShortcutColumn.py @@ -90,6 +90,9 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): self.input_dict[4].currentText(), float(self.input_dict[5].text()), float(self.input_dict[6].text()), float(self.input_dict[7].text()), self.input_dict[8].currentText()] self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: @@ -135,4 +138,4 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/DockWidgetSplitter.py b/DockWidgets/DockWidgetSplitter.py index 05dfb0b..24a8ee2 100644 --- a/DockWidgets/DockWidgetSplitter.py +++ b/DockWidgets/DockWidgetSplitter.py @@ -65,6 +65,9 @@ class DockWidgetSplitter(QDockWidget,ui_dialog): self.dict={} self.dict = [int(self.input_dict[0].text()),self.input_dict[1].currentText(), float(self.input_dict[2].text()), float(self.input_dict[3].text())] self.obj.param_setter(self.dict) + if(self.isVisible()): + currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) self.hide() except Exception as e: print(e) @@ -72,4 +75,4 @@ class DockWidgetSplitter(QDockWidget,ui_dialog): def closeEvent(self,event): scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value() - self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2)
\ No newline at end of file + self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
\ No newline at end of file diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex 5d0ec10..51ca871 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc Binary files differindex f11f259..ac95283 100644 --- a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc Binary files differindex aa0f582..9be19e9 100644 --- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc Binary files differindex 53d07bc..53e426a 100644 --- a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc Binary files differindex e5bba23..193f8e9 100644 --- a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc Binary files differindex 58c8a9e..ce2d5af 100644 --- a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc Binary files differindex dd67795..84d18de 100644 --- a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc Binary files differindex e19a9a3..2f45777 100644 --- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc |