From 8dc6426b7e2a68ab4a2f14f7d33550202abe358b Mon Sep 17 00:00:00 2001 From: reven Date: Sat, 17 Apr 2021 00:17:18 +0800 Subject: [PATCH] New folder dialog editor supports the enter shortcut --- qml/Dialogs/CreateFolderDialog.qml | 5 +++++ qml/FolderPage.qml | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qml/Dialogs/CreateFolderDialog.qml b/qml/Dialogs/CreateFolderDialog.qml index 8b069ca..b91ea91 100644 --- a/qml/Dialogs/CreateFolderDialog.qml +++ b/qml/Dialogs/CreateFolderDialog.qml @@ -38,6 +38,11 @@ Window { text: qsTr("New folder") focus: true + onAccepted: { + main.newFolder(_textField.text) + control.close() + } + Component.onCompleted: { _textField.selectAll() } diff --git a/qml/FolderPage.qml b/qml/FolderPage.qml index 28708a3..5e4040b 100644 --- a/qml/FolderPage.qml +++ b/qml/FolderPage.qml @@ -42,7 +42,6 @@ Item { id: dirModel viewAdapter: viewAdapter - Component.onCompleted: { if (arg) dirModel.url = arg