A collection keeps its selection in Rust by persisted position, and detailToggleItemSelect only toggled. It now takes `shift`: a plain or Ctrl click toggles and becomes the anchor, a Shift click adds every row between the anchor and the clicked one in the order the rows are DRAWN (filtered and sorted, not the position order), and the anchor is dropped wherever the selection is cleared. The list rows, their checkbox and the grid cards pass Shift through; the kiosk list passes false. In select mode a row's artwork still started playback and its title and subtitle still opened the item or the artist. They stand down now, so the click selects. cc
15 lines
563 B
QML
15 lines
563 B
QML
pragma Singleton
|
|
import QtQuick
|
|
QtObject {
|
|
property var selectCalls: []
|
|
property var opened: []
|
|
property var played: []
|
|
function detailToggleItemSelect(position, shift) {
|
|
selectCalls = selectCalls.concat([{ "position": position, "shift": shift }])
|
|
}
|
|
function openItem(source, itemType, id) { opened = opened.concat([String(id)]) }
|
|
function openArtist(source, name, id) { opened = opened.concat(["artist:" + name]) }
|
|
function playItem(id) { played = played.concat([String(id)]) }
|
|
function detailToggleRowExpand(id) {}
|
|
}
|