diff options
author | rahulp13 | 2022-02-22 22:34:10 +0530 |
---|---|---|
committer | rahulp13 | 2022-02-22 22:34:10 +0530 |
commit | 91b51ef49e77ebd8cf0f6db08b8bdee57d18293e (patch) | |
tree | a3f9ef198f7c3ed562d292d75924144daaae9fb7 | |
parent | 61a5e719c4994c633b96924c6ebaa829d4ee5338 (diff) | |
download | eSim-91b51ef49e77ebd8cf0f6db08b8bdee57d18293e.tar.gz eSim-91b51ef49e77ebd8cf0f6db08b8bdee57d18293e.tar.bz2 eSim-91b51ef49e77ebd8cf0f6db08b8bdee57d18293e.zip |
Fix incorrect status reporting on NgVeri UI terminal
-rwxr-xr-x | src/maker/NgVeri.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/maker/NgVeri.py b/src/maker/NgVeri.py index cb553a31..193c51d0 100755 --- a/src/maker/NgVeri.py +++ b/src/maker/NgVeri.py @@ -42,7 +42,6 @@ class NgVeri(QtWidgets.QWidget): # initialising the variables def __init__(self, filecount): - print(self) QtWidgets.QWidget.__init__(self) # Maker.addverilog(self) self.obj_Appconfig = Appconfig() @@ -99,7 +98,8 @@ class NgVeri(QtWidgets.QWidget): return self.fname = Maker.verilogFile[self.filecount] - model = ModelGeneration.ModelGeneration(self.fname, self.entry_var[0]) + currentTermLogs = QtWidgets.QTextEdit() + model = ModelGeneration.ModelGeneration(self.fname, currentTermLogs) file = (os.path.basename(self.fname)).split('.')[0] if self.entry_var[1].findText(file) == -1: self.entry_var[1].addItem(file) @@ -139,35 +139,38 @@ class NgVeri(QtWidgets.QWidget): self.nghdl_home + "/lib/ngspice/" ) except FileNotFoundError as err: - self.entry_var[0].append( + currentTermLogs.append( "Error in copying Ngveri code model: " + str(err) ) - terminalLog = self.entry_var[0].toPlainText() - if "error" not in terminalLog.lower(): - self.entry_var[0].append(''' + if "error" not in currentTermLogs.toPlainText().lower(): + currentTermLogs.append(''' <p style=\" font-size:16pt; font-weight:1000; color:#00FF00;\"> Model Created Successfully! </p> ''') - return - except BaseException as err: - self.entry_var[0].append( + currentTermLogs.append( "Error in Ngspice code model generation " + "from Verilog: " + str(err) ) - terminalLog = self.entry_var[0].toPlainText() - if "error" in terminalLog.lower(): - self.entry_var[0].append(''' + if "error" in currentTermLogs.toPlainText().lower(): + currentTermLogs.append(''' <p style=\" font-size:16pt; font-weight:1000; color:#FF0000;\">There was an error during model creation, <br/>Please rectify the error and try again! </p> ''') + self.entry_var[0].append(currentTermLogs.toHtml()) + + # Force scroll the terminal widget at bottom + self.entry_var[0].verticalScrollBar().setValue( + self.entry_var[0].verticalScrollBar().maximum() + ) + def addfile(self): ''' This function is used to add additional files required |