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
This commit is contained in:
con
2009-05-27 17:45:55 +02:00
parent 1b1b484184
commit efc865a48e

View File

@@ -1099,8 +1099,6 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node)
{ {
QMenu *contextMenu = 0; QMenu *contextMenu = 0;
updateContextMenuActions();
if (!node) if (!node)
node = m_session->sessionNode(); node = m_session->sessionNode();
@@ -1131,6 +1129,7 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node)
contextMenu = m_sessionContextMenu; contextMenu = m_sessionContextMenu;
} }
updateContextMenuActions();
if (contextMenu && contextMenu->actions().count() > 0) { if (contextMenu && contextMenu->actions().count() > 0) {
contextMenu->popup(globalPos); contextMenu->popup(globalPos);
} }