From 3c8f0d905b4f2a962591937e20c322068520ca3d Mon Sep 17 00:00:00 2001 From: GustavoLCR Date: Sat, 23 Jan 2021 12:09:44 -0300 Subject: [PATCH] Activate window before showing close dialog (#2573) --- src/core/MainWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp index 0174a8ce..bd27ac69 100644 --- a/src/core/MainWindow.cpp +++ b/src/core/MainWindow.cpp @@ -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));