diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index ee2bbcf4a80..9ed58160eaf 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -216,7 +216,8 @@ void CMakeBuildSystem::requestDebugging() bool CMakeBuildSystem::supportsAction(Node *context, ProjectAction action, const Node *node) const { - if (dynamic_cast(context)) + const auto cmakeTarget = dynamic_cast(context); + if (cmakeTarget && cmakeTarget->productType() != ProductType::Other) return action == ProjectAction::AddNewFile || action == ProjectAction::AddExistingFile || action == ProjectAction::AddExistingDirectory || action == ProjectAction::Rename || action == ProjectAction::RemoveFile;