Commit 07372a0d authored by dt's avatar dt
Browse files

Fix wrong en/disabling of actions

Reviewed-By: con
parent f30627b4
......@@ -1865,8 +1865,12 @@ void ProjectExplorerPlugin::goToTaskWindow()
void ProjectExplorerPlugin::updateContextMenuActions()
{
if (ProjectNode *projectNode = qobject_cast<ProjectNode*>(d->m_currentNode)) {
const bool addFilesEnabled = projectNode->supportedActions().contains(ProjectNode::AddFile);
d->m_addExistingFilesAction->setEnabled(false);
d->m_addNewFileAction->setEnabled(false);
d->m_removeFileAction->setEnabled(false);
if (FolderNode *folderNode = qobject_cast<FolderNode*>(d->m_currentNode)) {
const bool addFilesEnabled = folderNode->projectNode()->supportedActions().contains(ProjectNode::AddFile);
d->m_addExistingFilesAction->setEnabled(addFilesEnabled);
d->m_addNewFileAction->setEnabled(addFilesEnabled);
} else if (FileNode *fileNode = qobject_cast<FileNode*>(d->m_currentNode)) {
......
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