summaryrefslogtreecommitdiff
path: root/src/subcircuit/convertSub.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/subcircuit/convertSub.py')
-rw-r--r--src/subcircuit/convertSub.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py
index 7bdccfb2..efad8603 100644
--- a/src/subcircuit/convertSub.py
+++ b/src/subcircuit/convertSub.py
@@ -4,8 +4,7 @@ from configuration.Appconfig import Appconfig
import os
-# This class is called when User create new Project and contains \
-# functions to convert kicad to Ngspice.
+# This class is called when user creates new Project
class convertSub(QtGui.QWidget):
"""
Contains functions that checks project present for conversion and
@@ -34,7 +33,6 @@ class convertSub(QtGui.QWidget):
if self.obj_validation.validateKicad(self.projDir):
# Checking if project has .cir file or not
if self.obj_validation.validateCir(self.projDir):
- # print "CIR file present"
self.projName = os.path.basename(self.projDir)
self.project = os.path.join(self.projDir, self.projName)
@@ -42,14 +40,20 @@ class convertSub(QtGui.QWidget):
var2 = "sub"
self.obj_dockarea.kicadToNgspiceEditor(var1, var2)
else:
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage(
- 'The subcircuit does not contain any Kicad netlist file'
- + ' for conversion.')
+ self.msg = QtGui.QErrorMessage()
+ self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
+ self.msg.showMessage(
+ 'The subcircuit does not contain any Kicad netlist file' +
+ ' for conversion.'
+ )
+ self.msg.exec_()
else:
- self.msg = QtGui.QErrorMessage(None)
- self.msg.showMessage(
- 'Please select the subcircuit first. You can either create'
- + ' new subcircuit or open existing subcircuit')
+ self.msg = QtGui.QErrorMessage()
+ self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
+ self.msg.showMessage(
+ 'Please select the subcircuit first. You can either create ' +
+ 'new subcircuit or open existing subcircuit'
+ )
+ self.msg.exec_()