diff options
author | rahulp13 | 2020-02-15 14:41:09 +0530 |
---|---|---|
committer | rahulp13 | 2020-02-15 14:41:09 +0530 |
commit | 94326c365e361137412272a46caafe7f97620196 (patch) | |
tree | 5ccf3695b50a3168a26230e07fafeb9911160213 /src/subcircuit/newSub.py | |
parent | b173d88ac0059b67e60a042293b1e486c9620d8a (diff) | |
download | eSim-94326c365e361137412272a46caafe7f97620196.tar.gz eSim-94326c365e361137412272a46caafe7f97620196.tar.bz2 eSim-94326c365e361137412272a46caafe7f97620196.zip |
set modality to QErrorMessage
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_() |