From efc865a48e28c8e54949ab6b0a880fc400db07dd Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Wed, 27 May 2009 17:45:55 +0200
Subject: [PATCH] Correctly enable/disable the "Add new" and "Add existing"
 menu items.

The context menu was updated before the current node was set to the
right value, later in the showContextMenu method.

Task-number: 253989
---
 src/plugins/projectexplorer/projectexplorer.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 8b3fd4e70d6..dae289ae232 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1099,8 +1099,6 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node)
 {
     QMenu *contextMenu = 0;
 
-    updateContextMenuActions();
-
     if (!node)
         node = m_session->sessionNode();
 
@@ -1131,6 +1129,7 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node)
         contextMenu = m_sessionContextMenu;
     }
 
+    updateContextMenuActions();
     if (contextMenu && contextMenu->actions().count() > 0) {
         contextMenu->popup(globalPos);
     }
-- 
GitLab