summaryrefslogtreecommitdiff
path: root/src/frontEnd/Application.py
diff options
context:
space:
mode:
authorPranav P2023-05-04 19:26:04 +0530
committerPranav P2023-05-04 19:26:04 +0530
commitcf6bb2edf063ba6d3415434899e8a73a42755aa0 (patch)
treeb4f043ce7b8266ba3b4227d716b292adfa69e55c /src/frontEnd/Application.py
parent299b330406e6124ba3542833d8cb9b82cfc10d03 (diff)
downloadeSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.tar.gz
eSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.tar.bz2
eSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.zip
Disabled multiple simulations
Diffstat (limited to 'src/frontEnd/Application.py')
-rw-r--r--src/frontEnd/Application.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index 3c11045f..a34442b8 100644
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -581,6 +581,7 @@ class Application(QtWidgets.QMainWindow):
if st.st_mtime >= currTime - 1 and not is_ngspice_running:
self.is_file_changed = True
self.timer.stop()
+
self.plot_simulation()
return
except Exception:
@@ -610,18 +611,30 @@ class Application(QtWidgets.QMainWindow):
self.msg.exec_()
return
+
+ def enableButtons(self, state):
+ self.ngspice.setEnabled(state)
+ self.conversion.setEnabled(state)
+ self.closeproj.setEnabled(state)
+ self.wrkspce.setEnabled(state)
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.simulationEssentials = {
+ "timer": self.timer,
+ "enableButtons": self.enableButtons,
+ }
+
if self.projDir is not None:
currTime = time.time()
# Edited by Sumanto Kar 25/08/2021
+ self.enableButtons(False)
if self.obj_Mainview.obj_dockarea.ngspiceEditor(
- self.projDir, self.timer) is False:
+ self.projDir, self.simulationEssentials) is False:
print(
"Netlist file (*.cir.out) not found."
)