From 01a5ada6833ab8902a83c0b337326e596b06abc1 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 5 Mar 2023 07:11:36 -0600 Subject: [PATCH] select on right click: This selects when right clicking if there is no selection or when there is only one other selected item --- src/qml/presenter/LibraryItem.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qml/presenter/LibraryItem.qml b/src/qml/presenter/LibraryItem.qml index 925d098..5650807 100644 --- a/src/qml/presenter/LibraryItem.qml +++ b/src/qml/presenter/LibraryItem.qml @@ -317,8 +317,12 @@ ColumnLayout { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { - if (mouse.button === Qt.RightButton) + if (mouse.button === Qt.RightButton) { + if(selectionModel.selectedIndexes.length <= 1) + selectionModel.select(proxyModel.idx(index), + ItemSelectionModel.ClearAndSelect); rightClickMenu.popup() + } else if ((mouse.button === Qt.LeftButton) && (mouse.modifiers === Qt.ShiftModifier)) { if (libraryList.currentIndex < index) {