Skip to content

Allow setSelection for itemView in Single mode

setSelection event takes two indexes, start and end of a range to select in an item view.

The item view can be in different mode of selection, usually accepting multi selection. But it can also be SingleSelection, where only one item is selected a time. In that case the view API select acts only on the first item of the given range.

In the player, an early check used to return an error in SingleMode. I feel like it is not an error, only a corner case.

Also, I reformat code:

  • early return in if to avoid an explicit else
  • remove unused variable
Edited by Nicolas Vuaille

Merge request reports

Loading