diff options
author | Pravin Dalve | 2021-06-22 00:44:13 +0530 |
---|---|---|
committer | Pravin Dalve | 2021-06-22 00:44:13 +0530 |
commit | b590064106ff19d990beb824dabd653eb473d378 (patch) | |
tree | 52d0a29c4b0b119d4441c6bb1010c2b0b7e601a5 /DockWidgets/DockWidgetShortcutColumn.py | |
parent | ce501c2d9e437e3988105595d2e9068045a98720 (diff) | |
download | Chemical-Simulator-GUI-b590064106ff19d990beb824dabd653eb473d378.tar.gz Chemical-Simulator-GUI-b590064106ff19d990beb824dabd653eb473d378.tar.bz2 Chemical-Simulator-GUI-b590064106ff19d990beb824dabd653eb473d378.zip |
update compounds method added in shorcut column dockwidget
Diffstat (limited to 'DockWidgets/DockWidgetShortcutColumn.py')
-rw-r--r-- | DockWidgets/DockWidgetShortcutColumn.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/DockWidgets/DockWidgetShortcutColumn.py b/DockWidgets/DockWidgetShortcutColumn.py index 96069e5..a6fe33d 100644 --- a/DockWidgets/DockWidgetShortcutColumn.py +++ b/DockWidgets/DockWidgetShortcutColumn.py @@ -70,6 +70,15 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): except Exception as e: print(e) + + def update_compounds(self): + self.cb1.clear() + self.cb2.clear() + for i in self.obj.compounds: + self.cb1.addItem(str(i)) + self.cb2.addItem(str(i)) + self.cb1.setCurrentText(self.obj.compounds[int(self.obj.variables['HKey']['value']) - 1]) + self.cb2.setCurrentText(self.obj.compounds[int(self.obj.variables['LKey']['value']) - 1]) def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") |