diff options
author | Pranav P | 2023-05-07 17:01:26 +0530 |
---|---|---|
committer | Pranav P | 2023-05-07 17:01:26 +0530 |
commit | 2de5fa0604c35a1508bca8bab318724da823633a (patch) | |
tree | 81a8f07a61c4f1841a49074d0349e13da9ab5461 /src/frontEnd | |
parent | cf6bb2edf063ba6d3415434899e8a73a42755aa0 (diff) | |
download | eSim-2de5fa0604c35a1508bca8bab318724da823633a.tar.gz eSim-2de5fa0604c35a1508bca8bab318724da823633a.tar.bz2 eSim-2de5fa0604c35a1508bca8bab318724da823633a.zip |
Mentions whether simulation successful or not
Diffstat (limited to 'src/frontEnd')
-rw-r--r-- | src/frontEnd/Application.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index a34442b8..d584c714 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -578,12 +578,16 @@ class Application(QtWidgets.QMainWindow): is_ngspice_running = self.checkIfProcessRunning("ngspice") print("Ngspice is running:", is_ngspice_running) print(st.st_mtime, currTime) - if st.st_mtime >= currTime - 1 and not is_ngspice_running: - self.is_file_changed = True - self.timer.stop() + if not is_ngspice_running: + if st.st_mtime >= currTime - 1: + self.is_file_changed = True + self.timer.stop() - self.plot_simulation() - return + self.plot_simulation() + return + else: + self.timer.stop() + return except Exception: pass @@ -618,14 +622,19 @@ class Application(QtWidgets.QMainWindow): self.closeproj.setEnabled(state) self.wrkspce.setEnabled(state) + def isSimulationSuccess(self): + return self.is_file_changed + def open_ngspice(self): """This Function execute ngspice on current project.""" self.projDir = self.obj_appconfig.current_project["ProjectName"] self.timer = QtCore.QTimer(self) + self.is_file_changed = False self.simulationEssentials = { "timer": self.timer, "enableButtons": self.enableButtons, + "isSimulationSuccess": self.isSimulationSuccess, } if self.projDir is not None: |