diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-14 16:00:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-14 16:01:09 -0700 |
commit | 8650a6ef6c61843b1a08929cc9f265d06c053614 (patch) | |
tree | afd911e143974fac38168a557e8718d11c25a89c /qt-ui | |
parent | f4d56ddf6fd72fc24a3cb4e8033d65707af75cee (diff) | |
download | subsurface-8650a6ef6c61843b1a08929cc9f265d06c053614.tar.gz |
Make "save changes" dialog modal
This definitely seems to be a good candidate for a modal dialog.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 069d2f2f8..02c424fe2 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -577,7 +577,7 @@ QString MainWindow::filter() bool MainWindow::askSaveChanges() { QString message; - QMessageBox response; + QMessageBox response(MainWindow::instance()); if (existing_filename) message = tr("Do you want to save the changes you made in the file %1?").arg(existing_filename); @@ -590,6 +590,7 @@ bool MainWindow::askSaveChanges() response.setWindowTitle(tr("Save Changes?")); // Not displayed on MacOSX as described in Qt API response.setInformativeText(tr("Changes will be lost if you don't save them.")); response.setIcon(QMessageBox::Warning); + response.setWindowModality(Qt::WindowModal); int ret = response.exec(); switch (ret) { |