Commit efc865a4 authored by con's avatar con
Browse files

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
parent 1b1b4841
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment