Activate window before showing close dialog (#2573)

This commit is contained in:
GustavoLCR 2021-01-23 12:09:44 -03:00 committed by GitHub
parent bb6a9e2a91
commit 3c8f0d905b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -755,6 +755,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
return;
}
activateWindow();
QMessageBox::StandardButton ret = QMessageBox::question(this, APPNAME,
tr("Do you really want to exit?\nSave your project before closing!"),
(QMessageBox::StandardButtons)(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel));