2.1.31: Multiple-item drag in Playlist fails

Try this:

  1. In a Playlist containing several, select more than one (for example, three) consecutive items with Shift+click.
  2. Drag the items a few positions down (or up!) the Playlist.

Ouch! Not all of the items move correctly: probably at least one will stay where it was, and the others may move as a block to the new location, or they may ‘scatter.’ Not good; except perhaps as a means of ‘shuffling’ the Playlist ;).

The problem is even worse if you use Ctrl+click to select two or more non-consecutive items and then drag those to a new location.

I can supply screen shots of the mayhem if that would help, but you easily try it yourself.

(Non-programmers may prefer to ‘look away now…’ :wink: )

Having done a lot of ‘grid/treeview’ object programming myself, I guess this is either:
a) a bug in Torben’s code in the drag-drop event method(s) of the VT Playlist object; or
b) a bug in the VirtualTreeview component itself.
I have not looked in detail at VT, so I don’t know if drag-drop handling is ‘internal’ to VT or not. :slight_smile:

The easiest way to fix this would obviously be to allow only single selections in Playlists. That would be rather limiting, but might be the only practical solution.

The second easiest way to fix it would be to allow only contiguous row selections (i.e. multiple selections must be a ‘continuous unbroken block’ of rows), and then make sure that the ‘block’ does move as a single ‘unit’ to the drop target. :wink: This would be my personal preference, but unfortunately, I don’t think VT has (?) a property to ‘limit’ selections in that way.

Probably the most difficult ‘fix’ would be to allow even non-continuous rows to be drag-dropped to a new location. Firstly, does the user in this case want to move all the selected rows to the one place, and in the order they were originally? I think we would have to assume that they do. For example, select three non-contiguous rows:Row A Row B <== selected Row C Row D <== selected Row E Row F <== selected Row G Row H…now drag-drop the selected rows below Row G. Probably what the user is expecting is this:Row A Row C Row E Row G Row B <== selected Row D <== selected Row F <== selected Row HYou see what I meant about this one being especially difficult to program?

Maybe the only practical solution is to to disallow a drag if more than one item is currently selected (perhaps with a polite MessageBox reading something like ‘Please select only one item before starting a drag-drop.’). You would of course still need to allow multiple selections for (e.g.) a Delete operation.

Sorry to ramble on about this, but it raises some very interesting GUI issues. (Well, I think they’re interesting!)

BFN
CAD