From bbd19e04101a99a6647c819b52042055ef563e0e Mon Sep 17 00:00:00 2001 From: kateleet Date: Fri, 3 Dec 2021 04:44:56 +0800 Subject: [PATCH] Fix sidebar clicked() --- qml/SideBar.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qml/SideBar.qml b/qml/SideBar.qml index a93de27..02dbaa6 100644 --- a/qml/SideBar.qml +++ b/qml/SideBar.qml @@ -97,9 +97,8 @@ ListView { if (mouse.button === Qt.LeftButton) { if (model.isDevice && model.setupNeeded) placesModel.requestSetup(index) - - // sideBar.currentIndex = index - sideBar.clicked(model.path ? model.path : model.url) + else + sideBar.clicked(model.path ? model.path : model.url) } else if (mouse.button === Qt.RightButton) { _menu.popup() } @@ -115,8 +114,8 @@ ListView { onTriggered: { if (model.isDevice && model.setupNeeded) placesModel.requestSetup(index) - - sideBar.clicked(model.path ? model.path : model.url) + else + sideBar.clicked(model.path ? model.path : model.url) } }