summaryrefslogtreecommitdiff
path: root/mainApp.py
diff options
context:
space:
mode:
authorpravindalve2023-02-07 13:04:01 +0530
committerGitHub2023-02-07 13:04:01 +0530
commit651b94f869dde8c3ca75fd1a0e41c32bc01c240d (patch)
tree26a78391fbd38db78e4f3f2a242c7639c3081c56 /mainApp.py
parente10e1eebbf6927d5548ccb7bbb6563994cee0c35 (diff)
parentf53af896c241d0628625452ef66f4a7255ec2846 (diff)
downloadChemical-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 'mainApp.py')
-rw-r--r--mainApp.py32
1 files changed, 18 insertions, 14 deletions
diff --git a/mainApp.py b/mainApp.py
index 1430960..32128ae 100644
--- a/mainApp.py
+++ b/mainApp.py
@@ -335,21 +335,25 @@ class MainApp(QMainWindow,ui):
file_name, _ = QFileDialog.getOpenFileName(self, "Open As",
initial_path, "%s Files (*.%s);; All Files (*)" %
(file_format.upper(), file_format))
+ if file_name:
+ self.undo_redo_helper()
- self.undo_redo_helper()
-
- with open(file_name, 'rb') as f:
- obj = pickle.load(f)
- temp_result = obj[-1]
- obj.pop()
- compound_selected = obj[-1]
- obj.pop()
- self.comp.set_compounds(compound_selected)
- for i in compound_selected:
- self.comp.compound_selection(self.comp, i)
- self.container.graphics.load_canvas(obj, self.container)
- self.container.result = temp_result
- DockWidget.show_result(dock_widget_lst)
+ with open(file_name, 'rb') as f:
+ obj = pickle.load(f)
+ temp_result = obj[-1]
+ obj.pop()
+ compound_selected = obj[-1]
+ obj.pop()
+ self.comp.set_compounds(compound_selected)
+ for i in compound_selected:
+ self.comp.compound_selection(self.comp, i)
+ self.comp.hide()
+ self.container.graphics.load_canvas(obj, self.container)
+ self.container.result = temp_result
+ DockWidget.show_result(dock_widget_lst)
+
+ for i in dock_widget_lst:
+ i.param()
except Exception as e: