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/modelEditor/ModelEditor.py | |
parent | b173d88ac0059b67e60a042293b1e486c9620d8a (diff) | |
download | eSim-94326c365e361137412272a46caafe7f97620196.tar.gz eSim-94326c365e361137412272a46caafe7f97620196.tar.bz2 eSim-94326c365e361137412272a46caafe7f97620196.zip |
set modality to QErrorMessage
Diffstat (limited to 'src/modelEditor/ModelEditor.py')
-rw-r--r-- | src/modelEditor/ModelEditor.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modelEditor/ModelEditor.py b/src/modelEditor/ModelEditor.py index 3f616808..7db35251 100644 --- a/src/modelEditor/ModelEditor.py +++ b/src/modelEditor/ModelEditor.py @@ -424,9 +424,11 @@ class ModelEditorclass(QtGui.QWidget): if ok: if text1 in list(self.modeldict.keys()): self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( "The paramaeter " + text1 + " is already in the list") - self.msg.setWindowTitle("Error Message") + self.msg.exec_() return text2, ok = QtGui.QInputDialog.getText( self, 'Value', 'Enter Value') @@ -614,9 +616,11 @@ class ModelEditorclass(QtGui.QWidget): all_files = os.listdir(each_dir) if newfilename in all_files: self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'The file with name ' + text + ' already exists.') - self.msg.setWindowTitle("Error Message") + self.msg.exec_() def savethefile(self, editfile): ''' |