Fix sidebar clicked()

This commit is contained in:
kateleet 2021-12-03 04:44:56 +08:00
parent 02223a5d41
commit bbd19e0410

View file

@ -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)
}
}