From 75964fe6081f96a4c0a82a3ec267c1d04b4179a1 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:56:24 +1000 Subject: filedialog: add filters and buttons --- widgets/filedialog/FolderContents.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'widgets/filedialog/FolderContents.qml') 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); } -- cgit v1.2.3-freya