diff options
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditorplugin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index b937f9c89e..57db21346c 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -623,18 +623,16 @@ QString PythonProjectNode::addFileFilter() const bool PythonProjectNode::supportsAction(ProjectAction action, const Node *node) const { - switch (node->nodeType()) { - case NodeType::File: + if (node->isFileNodeType()) { return action == ProjectAction::Rename || action == ProjectAction::RemoveFile; - case NodeType::Folder: - case NodeType::Project: + } + if (node->isFolderNodeType() || node->isProjectNodeType()) { return action == ProjectAction::AddNewFile || action == ProjectAction::RemoveFile || action == ProjectAction::AddExistingFile; - default: - return ProjectNode::supportsAction(action, node); } + return ProjectNode::supportsAction(action, node); } bool PythonProjectNode::addFiles(const QStringList &filePaths, QStringList *) |