diff options
Diffstat (limited to 'src/frontEnd')
-rw-r--r-- | src/frontEnd/Application.py | 4 | ||||
-rwxr-xr-x | src/frontEnd/DockArea.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 730ba9d8..3c11045f 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -614,13 +614,14 @@ class Application(QtWidgets.QMainWindow): def open_ngspice(self): """This Function execute ngspice on current project.""" self.projDir = self.obj_appconfig.current_project["ProjectName"] + self.timer = QtCore.QTimer(self) if self.projDir is not None: currTime = time.time() # Edited by Sumanto Kar 25/08/2021 if self.obj_Mainview.obj_dockarea.ngspiceEditor( - self.projDir) is False: + self.projDir, self.timer) is False: print( "Netlist file (*.cir.out) not found." ) @@ -635,7 +636,6 @@ class Application(QtWidgets.QMainWindow): return self.count = 0 - self.timer = QtCore.QTimer(self) self.timer.setInterval(1000) self.timer.timeout.connect(lambda: self.check_change_in_plotfile(currTime)) self.timer.start() diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 461240b9..4cab6261 100755 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -117,9 +117,10 @@ class DockArea(QtWidgets.QMainWindow): ) count = count + 1 - def ngspiceEditor(self, projDir): + def ngspiceEditor(self, projDir, timer): """ This function creates widget for Ngspice window.""" self.projDir = projDir + self.qTimer = timer self.projName = os.path.basename(self.projDir) self.ngspiceNetlist = os.path.join( self.projDir, self.projName + ".cir.out") @@ -133,7 +134,7 @@ class DockArea(QtWidgets.QMainWindow): self.ngspiceLayout = QtWidgets.QVBoxLayout() self.ngspiceLayout.addWidget( - NgspiceWidget(self.ngspiceNetlist, self.projDir) + NgspiceWidget(self.ngspiceNetlist, self.projDir, self.qTimer) ) # Adding to main Layout |