diff options
Diffstat (limited to 'src/subcircuit/newSub.py')
-rw-r--r-- | src/subcircuit/newSub.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/subcircuit/newSub.py b/src/subcircuit/newSub.py index 90f60319..f4b3100c 100644 --- a/src/subcircuit/newSub.py +++ b/src/subcircuit/newSub.py @@ -55,32 +55,40 @@ class NewSub(QtGui.QWidget): self.close() except BaseException: self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'Unable to create subcircuit. Please make sure ' + 'you have write permission on ' + self.schematic_path ) - self.msg.setWindowTitle("Error Message") + self.msg.exec_() self.obj_appconfig.current_subcircuit['SubcircuitName'] \ = self.schematic_path elif self.reply == "CHECKEXIST": self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'The subcircuit "' + self.create_schematic + '" already exist.Please select the different name or delete' + 'existing subcircuit' ) - self.msg.setWindowTitle("Error Message") + self.msg.exec_() elif self.reply == "CHECKNAME": self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'The subcircuit name should not contain space between them' ) - self.msg.setWindowTitle("Error Message") + self.msg.exec_() elif self.reply == "NONE": self.msg = QtGui.QErrorMessage(self) - self.msg.showMessage('The subcircuit name cannot be empty') + self.msg.setModal(True) self.msg.setWindowTitle("Error Message") + self.msg.showMessage('The subcircuit name cannot be empty') + self.msg.exec_() |