From 94326c365e361137412272a46caafe7f97620196 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Sat, 15 Feb 2020 14:41:09 +0530 Subject: set modality to QErrorMessage --- src/modelEditor/ModelEditor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/modelEditor') 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): ''' -- cgit