Commit 6ba03794 authored by Konstantin Tokarev's avatar Konstantin Tokarev Committed by Daniel Teske
Browse files

Don't set foreign projects and nodes as context project and node.



Change-Id: Ie7952be114570e5b3387c1736d97e822fb7e6944
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 39438343
......@@ -391,14 +391,17 @@ void Qt4ProjectManagerPlugin::currentNodeChanged(ProjectExplorer::Node *node, Pr
{
m_addLibraryActionContextMenu->setEnabled(qobject_cast<Qt4ProFileNode *>(node));
m_qt4ProjectManager->setContextNode(node ? node->projectNode() : 0);
m_qt4ProjectManager->setContextProject(project);
Qt4Project *pro = qobject_cast<Qt4Project *>(project);
Qt4ProFileNode *subProjectNode = node ? qobject_cast<Qt4ProFileNode *>(node->projectNode()) : 0;
m_qt4ProjectManager->setContextNode(subProjectNode);
m_qt4ProjectManager->setContextProject(pro);
bool subProjectActionsVisible = node && project && node->projectNode() && (node->projectNode() != project->rootProjectNode());
bool subProjectActionsVisible = pro && subProjectNode && (subProjectNode != pro->rootProjectNode());
QString subProjectName;
if (subProjectActionsVisible)
subProjectName = node->projectNode()->displayName();
subProjectName = subProjectNode->displayName();
m_buildSubProjectAction->setParameter(subProjectName);
m_rebuildSubProjectAction->setParameter(subProjectName);
......
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