forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -40,8 +40,9 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
@@ -49,8 +50,8 @@ using namespace CMakeProjectManager::Internal;
|
||||
CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
|
||||
: m_settingsPage(cmakeSettingsPage)
|
||||
{
|
||||
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||
connect(projectExplorer, &ProjectExplorer::ProjectExplorerPlugin::aboutToShowContextMenu,
|
||||
ProjectExplorer::ProjectTree *tree = ProjectExplorer::ProjectTree::instance();
|
||||
connect(tree, &ProjectExplorer::ProjectTree::aboutToShowContextMenu,
|
||||
this, &CMakeManager::updateContextMenu);
|
||||
|
||||
Core::ActionContainer *mbuild =
|
||||
|
||||
Reference in New Issue
Block a user