mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
f4d56ddf6f
commit
8650a6ef6c
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue