summaryrefslogtreecommitdiff
path: root/widgets/filedialog/FolderContents.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-20 15:56:24 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-20 15:56:24 +1000
commit75964fe6081f96a4c0a82a3ec267c1d04b4179a1 (patch)
treec939167d0d643a6f67652647478fdb97c8d0c52e /widgets/filedialog/FolderContents.qml
parentfiledialog: add current item (diff)
downloadcaelestia-shell-75964fe6081f96a4c0a82a3ec267c1d04b4179a1.tar.gz
caelestia-shell-75964fe6081f96a4c0a82a3ec267c1d04b4179a1.tar.bz2
caelestia-shell-75964fe6081f96a4c0a82a3ec267c1d04b4179a1.zip
filedialog: add filters and buttons
Diffstat (limited to 'widgets/filedialog/FolderContents.qml')
-rw-r--r--widgets/filedialog/FolderContents.qml7
1 files changed, 4 insertions, 3 deletions
diff --git a/widgets/filedialog/FolderContents.qml b/widgets/filedialog/FolderContents.qml
index 81f8729..84449ca 100644
--- a/widgets/filedialog/FolderContents.qml
+++ b/widgets/filedialog/FolderContents.qml
@@ -16,6 +16,7 @@ Item {
id: root
required property var dialog
+ property alias currentItem: view.currentItem
StyledRect {
anchors.fill: parent
@@ -82,11 +83,11 @@ Item {
Keys.onEscapePressed: currentIndex = -1
Keys.onReturnPressed: {
- if (currentItem)
+ if (root.dialog.selectionValid)
root.dialog.accepted(currentItem.filePath);
}
Keys.onEnterPressed: {
- if (currentItem)
+ if (root.dialog.selectionValid)
root.dialog.accepted(currentItem.filePath);
}
@@ -127,7 +128,7 @@ Item {
onDoubleClicked: {
if (item.fileIsDir)
root.dialog.cwd.push(item.fileName);
- else
+ else if (root.dialog.selectionValid)
root.dialog.accepted(item.filePath);
}