From 314fd25f6e0db5fd3110e641dcc01fb064fb68e6 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Wed, 28 Dec 2011 11:50:26 +0200 Subject: [PATCH] GUI: Disable project MRU items while checking. Project file can't be opened when the check is running. So the menu items must be disabled. Fixes ticket: #3446 (GUI: MRU items must be disabled while checking) --- gui/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 20b86e75c..6ed2382f5 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -530,6 +530,11 @@ void MainWindow::CheckDone() mUI.mActionSave->setEnabled(true); } + for (int i = 0; i < MaxRecentProjects + 1; i++) { + if (mRecentProjectActs[i] != NULL) + mRecentProjectActs[i]->setEnabled(true); + } + // Notify user - if the window is not active - that check is ready QApplication::alert(this, 3000); } @@ -545,6 +550,11 @@ void MainWindow::CheckLockDownUI() mUI.mActionCplusplus11->setEnabled(false); mUI.mActionC99->setEnabled(false); mUI.mActionPosix->setEnabled(false); + + for (int i = 0; i < MaxRecentProjects + 1; i++) { + if (mRecentProjectActs[i] != NULL) + mRecentProjectActs[i]->setEnabled(false); + } } void MainWindow::ProgramSettings()