summaryrefslogtreecommitdiff
path: root/mainApp.py
diff options
context:
space:
mode:
authorbrenda-br2023-02-16 21:46:01 +0530
committerbrenda-br2023-02-16 21:46:01 +0530
commite518e76814763ee66c02e8c87b642f5e5c1a271b (patch)
treeb5e83cc8e2fa13c55723a25db33e142e43c50037 /mainApp.py
parentc21e2857f6c0de9ab94c4b768fbde0de817aede4 (diff)
downloadChemical-Simulator-GUI-e518e76814763ee66c02e8c87b642f5e5c1a271b.tar.gz
Chemical-Simulator-GUI-e518e76814763ee66c02e8c87b642f5e5c1a271b.tar.bz2
Chemical-Simulator-GUI-e518e76814763ee66c02e8c87b642f5e5c1a271b.zip
Fix #58 Stop Simulation Button added
Diffstat (limited to 'mainApp.py')
-rw-r--r--mainApp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mainApp.py b/mainApp.py
index 8381000..ea957bd 100644
--- a/mainApp.py
+++ b/mainApp.py
@@ -173,16 +173,17 @@ class MainApp(QMainWindow,ui):
os.chdir(self.container.flowsheet.root_dir)
if self.thrd:
thread_id = self.thrd.ident
- print('____________________Going to terminate simulation thread with Thread ID:',thread_id,'____________________')
- print('____________________Going to terminate the new process created for omc____________________')
+ # print('____________________Going to terminate simulation thread with Thread ID:',thread_id,'____________________')
+ # print('____________________Going to terminate the new process created for omc____________________')
self.container.flowsheet.process.terminate()
print('____________________New process created for omc is terminated.____________________')
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, ctypes.py_object(SystemExit))
- self.textBrowser.append("<span style=\"color:red\">["+str(self.current_time())+"]<b> Terminating the simulation </b></span>")
- print('____________________Simulation thread terminated____________________')
+ self.textBrowser.append("<span style=\"color:red\">["+str(self.current_time())+"]<b>Simulation Terminated.</b></span>")
+ self.container.disableInterfaceforSimulation(False)
+ # print('____________________Simulation thread terminated____________________')
if res > 1:
ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, 0)
- print('Exception raise (Thread termination) failure')
+ # print('Exception raise (Thread termination) failure')
'''
Resets the zoom level to default scaling