diff options
author | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-01-13 15:50:37 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@theqtcompany.com> | 2015-01-15 16:06:45 +0100 |
commit | 27fd8d4eb57f3156b7c1d384013965b4e2d376fa (patch) | |
tree | 70c8de22c2a87bcca58979cda8f9bc9c38c5d64e /src/plugins/genericprojectmanager/genericprojectplugin.cpp | |
parent | 7e522c8a3719b8f65f8f45ff46635011714fad09 (diff) | |
download | qt-creator-27fd8d4eb57f3156b7c1d384013965b4e2d376fa.tar.gz |
ProjectTree: Fix context menu actions
Opening the context menu would move the focus, which then would
reset the current node/project to come from the DocumentManager.
So move the context menu handling code to the ProjectTree class
and ensure that while it is open, the corresponding ProjectTree
is considered the focused widget.
Task-number: QTCREATORBUG-13684
Change-Id: I8b3dc410f5f5bc5e9a2dd663421b22cf3f147190
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/genericprojectmanager/genericprojectplugin.cpp')
-rw-r--r-- | src/plugins/genericprojectmanager/genericprojectplugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/genericprojectmanager/genericprojectplugin.cpp b/src/plugins/genericprojectmanager/genericprojectplugin.cpp index f982cb27dd..d282e1f2de 100644 --- a/src/plugins/genericprojectmanager/genericprojectplugin.cpp +++ b/src/plugins/genericprojectmanager/genericprojectplugin.cpp @@ -44,7 +44,7 @@ #include <coreplugin/actionmanager/actioncontainer.h> #include <projectexplorer/projectexplorerconstants.h> -#include <projectexplorer/projectexplorer.h> +#include <projectexplorer/projecttree.h> #include <projectexplorer/selectablefilesmodel.h> #include <QtPlugin> @@ -85,7 +85,7 @@ bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage connect(editFilesAction, &QAction::triggered, this, &GenericProjectPlugin::editFiles); - connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::aboutToShowContextMenu, + connect(ProjectTree::instance(), &ProjectTree::aboutToShowContextMenu, [this] (Project *project, Node *) { m_contextMenuProject = project; }); return true; |