Commit c3284e60 authored by con's avatar con
Browse files

Fixes: "Open with" context menu disabled in project tree.

Task-number: QTCREATORBUG-1764
parent a945f8b5
...@@ -406,10 +406,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er ...@@ -406,10 +406,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// "open with" submenu // "open with" submenu
Core::ActionContainer * const openWith = Core::ActionContainer * const openWith =
am->createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT); am->createMenu(ProjectExplorer::Constants::M_OPENFILEWITHCONTEXT);
openWith->setEmptyAction(Core::ActionContainer::EA_None);
d->m_openWithMenu = openWith->menu(); d->m_openWithMenu = openWith->menu();
d->m_openWithMenu->setTitle(tr("Open With")); d->m_openWithMenu->setTitle(tr("Open With"));
connect(mfilec->menu(), SIGNAL(aboutToShow()), this, SLOT(populateOpenWithMenu()));
connect(d->m_openWithMenu, SIGNAL(triggered(QAction *)), connect(d->m_openWithMenu, SIGNAL(triggered(QAction *)),
this, SLOT(openWithMenuTriggered(QAction *))); this, SLOT(openWithMenuTriggered(QAction *)));
...@@ -1206,6 +1206,7 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node) ...@@ -1206,6 +1206,7 @@ void ProjectExplorerPlugin::showContextMenu(const QPoint &globalPos, Node *node)
contextMenu = d->m_folderMenu; contextMenu = d->m_folderMenu;
break; break;
case FileNodeType: case FileNodeType:
populateOpenWithMenu();
contextMenu = d->m_fileMenu; contextMenu = d->m_fileMenu;
break; break;
default: default:
......
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