Commit 7d0c7ff8 authored by Nate Graham's avatar Nate Graham
Browse files

foldermodel: hide paste action when right-clicking on files

It doesn't make sense to offer a paste action when right-clicking on a
file as it implies that the paste will overwrite the file, or at least
interact with it in some way, but this is false.

Dolphin follows this logic and doesn't offer a paste action when
right-clicking on files, but Folder View does not, and it should.
This commit makes the Paste action not appear if the thing that was
right-clicked on is a file, rather than a folder or the wallpaper.

BUG: 448913
FIXED-IN: 5.24
parent 8eb8dda4
Pipeline #138132 passed with stage
in 5 minutes and 9 seconds
......@@ -1849,8 +1849,10 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
if (urls.length() == 1 && items.first().isDir()) {
if (urls.length() == 1) {
if (items.first().isDir()) {
} else {
Supports Markdown
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