summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation
diff options
context:
space:
mode:
authorPranav P2023-05-19 11:16:58 +0530
committerPranav P2023-05-19 11:16:58 +0530
commit1c0b9197069c12f2a9b0c35be936e97d38c6a372 (patch)
tree0ddc8b79294c721d3dae2436b65e2ca1eb9a958d /src/ngspiceSimulation
parent5ade06b5d3559b1d01dafdfabcb71f169bfd633c (diff)
downloadeSim-1c0b9197069c12f2a9b0c35be936e97d38c6a372.tar.gz
eSim-1c0b9197069c12f2a9b0c35be936e97d38c6a372.tar.bz2
eSim-1c0b9197069c12f2a9b0c35be936e97d38c6a372.zip
Added redo simulation button to progressbar window
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 9a56414b..cbcd381b 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -52,6 +52,7 @@ class NgspiceWidget(QtWidgets.QWidget):
# Creating argument for process
self.args = ['-b', '-r', command.replace(".cir.out", ".raw"), command]
self.process.setWorkingDirectory(projPath)
+ self.progressBarUi.setNgspiceArgs(self.args)
self.process.start('ngspice', self.args)
self.process.readyReadStandardOutput.connect(lambda: self.readyReadAll())
self.process.finished.connect(self.finishSimulation)
@@ -68,6 +69,7 @@ class NgspiceWidget(QtWidgets.QWidget):
print(self.gawCommand)
def finishSimulation(self):
+ self.readyToPrintSimulationStatus = True
self.enableButtons = self.simulationEssentials['enableButtons']
self.enableButtons(True)
@@ -76,6 +78,8 @@ class NgspiceWidget(QtWidgets.QWidget):
self.qTimer.timeout.connect(self.writeSimulationStatus)
def writeSimulationStatus(self):
+ if self.readyToPrintSimulationStatus is False:
+ return
self.isSimulationSuccess = self.simulationEssentials['isSimulationSuccess']
if self.isSimulationSuccess():
@@ -84,6 +88,7 @@ class NgspiceWidget(QtWidgets.QWidget):
self.progressBarUi.writeSimulationStatusToConsole(isSuccess=False)
self.progressBarUi.scrollConsoleToBottom()
+ self.readyToPrintSimulationStatus = False
@QtCore.pyqtSlot()
def readyReadAll(self):