LMMS/lmms — pull request #776 by xsleonard (2014-05-26 20:03:57+00:00)
Title: Copy+Paste for rubberband selections in track editor

Summary
========

Ctrl+click+drag copies selections. Pasting onto the same grabbed TCO is prevented,
but pasting from one TCO onto another copies the whole selection.
The selection is changed to the newly pasted group. The "no" icon is displayed if the paste cannot occur (would result in out of bounds TCOs, TCOs on mismatched tracks, or pasting onto the same grabbed TCO).

While pasting onto the same grabbed TCO is prevented, if the slot next to the grabbed TCO is empty and we move to it then back to the grabbed TCO, the paste will not be prevented. This is due to a mouseMoveEvent not being triggered when re-entering and is unintentional.

Pasting onto the same TCO is also prevent when not in rubberband. It was effectively a no-op previously, now the "no" symbol is displayed.

I am not against pasting into the same TCO, except that more often than not it is a mistake, and you don't always realize you have two TCOs in the same slot until your headphones are blaring from double notes since there is no UI indication.

When in allowRubberband, ctrl+click toggles a single trackContentObjectView
when the mouse is released rather than pressed, and only if the mouse did not
move. If the mouse moved, there was an intent to copy the selected trackContents, and a toggle will not occur. "Move" is currently set at 2 pixels distance, in case of jitters with the user.

Disabled rendering of SizeHorCursor when click-dragging a TCO while in rubberBand mode.
Click-dragging an unselected TCO has no effect in this mode; what would happen is
the resize cursor would appear as long as you were to the right of the TCO's
right boundary, which is only confusing since you can't do anything in this operation.

I think I fixed a pasting inaccuracy in non-rubberband mode as well, the wrong MidiTime getTact() function was being called, but I don't recall where it was.

Review
======

The journalling API was not clear so I doubt I am doing that correctly.

Todo
====

* Delete selection
* Better pasting UI indication. We display the grabbed TCO's pixmap icon even for full selections. I think showing the potential new TCOs ghosted onto the track view might work well.
* Ctrl+a selects all