summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r--src/kicadtoNgspice/Convert.py5
-rw-r--r--src/kicadtoNgspice/KicadtoNgspice.py8
-rw-r--r--src/kicadtoNgspice/SubcircuitTab.py20
3 files changed, 21 insertions, 12 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index ae26f3b8..7ab57427 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -585,10 +585,11 @@ class Convert:
if len(self.obj_track.subcircuitList) != len(
self.obj_track.subcircuitTrack):
self.msg = QtGui.QErrorMessage()
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Conversion failed. Please add all Subcircuits.")
- self.msg.setWindowTitle("Error Message")
- self.msg.show()
+ self.msg.exec_()
raise Exception('All subcircuit directories need to be specified.')
elif not subList:
print("No Subcircuit Added in the schematic")
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py
index ab2e55e8..cfc4f671 100644
--- a/src/kicadtoNgspice/KicadtoNgspice.py
+++ b/src/kicadtoNgspice/KicadtoNgspice.py
@@ -121,18 +121,22 @@ class MainWindow(QtGui.QWidget):
if unknownModelList:
print("Unknown Model List is : ", unknownModelList)
self.msg = QtGui.QErrorMessage()
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Unknown Models")
self.content = "Your schematic contain unknown model " + \
', '.join(unknownModelList)
self.msg.showMessage(self.content)
- self.msg.setWindowTitle("Unknown Models")
+ self.msg.exec_()
elif multipleModelList:
self.msg = QtGui.QErrorMessage()
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Multiple Models")
self.mcontent = "Look like you have duplicate model in \
modelParamXML directory " + \
', '.join(multipleModelList[0])
self.msg.showMessage(self.mcontent)
- self.msg.setWindowTitle("Multiple Models")
+ self.msg.exec_()
else:
self.createMainWindow()
diff --git a/src/kicadtoNgspice/SubcircuitTab.py b/src/kicadtoNgspice/SubcircuitTab.py
index 116b70b1..08ad7332 100644
--- a/src/kicadtoNgspice/SubcircuitTab.py
+++ b/src/kicadtoNgspice/SubcircuitTab.py
@@ -156,17 +156,19 @@ class SubcircuitTab(QtGui.QWidget):
self.obj_trac.subcircuitTrack[self.subName] = self.subfile
elif self.reply == "PORT":
self.msg = QtGui.QErrorMessage(self)
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a Subcircuit with correct number of ports.")
- self.msg.setWindowTitle("Error Message")
- self.msg.show()
+ self.msg.exec_()
elif self.reply == "DIREC":
self.msg = QtGui.QErrorMessage(self)
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a valid Subcircuit directory "
"(Containing '.sub' file).")
- self.msg.setWindowTitle("Error Message")
- self.msg.show()
+ self.msg.exec_()
def trackSubcircuitWithoutButton(self, iter_value, path_value):
"""
@@ -189,14 +191,16 @@ class SubcircuitTab(QtGui.QWidget):
self.obj_trac.subcircuitTrack[self.subName] = self.subfile
elif self.reply == "PORT":
self.msg = QtGui.QErrorMessage(self)
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a Subcircuit with correct number of ports.")
- self.msg.setWindowTitle("Error Message")
- self.msg.show()
+ self.msg.exec_()
elif self.reply == "DIREC":
self.msg = QtGui.QErrorMessage(self)
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Please select a valid Subcircuit directory "
"(Containing '.sub' file).")
- self.msg.setWindowTitle("Error Message")
- self.msg.show()
+ self.msg.exec_()