From a3b9f0cd9a6a8be1d41712d73e386627596b1ad9 Mon Sep 17 00:00:00 2001 From: Tian Shilin Date: Mon, 1 Jun 2026 15:17:56 +0800 Subject: [PATCH] fix: select first notebook by default in move note dialog log:MoveDialog.index starts at -1 and ItemDelegate has no visual feedback for the selected state, so the dialog opens with no default selection and the OK button stays disabled. pms: bug-349691 --- src/gui/dialog/MoveDialog.qml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/dialog/MoveDialog.qml b/src/gui/dialog/MoveDialog.qml index 0a24bad4b..7c960065f 100644 --- a/src/gui/dialog/MoveDialog.qml +++ b/src/gui/dialog/MoveDialog.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -11,7 +11,7 @@ DialogWindow { id: dialog property alias folderModel: folderList.model - property int index: -1 + property int index: 0 property string name signal moveToFolder(int index) @@ -19,6 +19,8 @@ DialogWindow { height: 365 width: 370 + onVisibleChanged: if (visible) index = 0 + header: DialogTitleBar { enableInWindowBlendBlur: true title: qsTr("Move Note") @@ -60,8 +62,13 @@ DialogWindow { } } - onClicked: { - dialog.index = index; + onClicked: dialog.index = index + + background: Rectangle { + radius: 6 + color: index === dialog.index + ? (DTK.themeType === ApplicationHelper.LightType ? "#33000000" : "#33FFFFFF") + : "transparent" } // text: model.name