select on right click:

This selects when right clicking if there is no selection
or when there is only one other selected item
This commit is contained in:
Chris Cochrun 2023-03-05 07:11:36 -06:00
parent 3caf04494c
commit 01a5ada683

View file

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