/* get everything in the correct order */
- if (!selection->tracks.empty()) {
- /* there are some selected tracks, so paste to them */
+ if (_edit_point == Editing::EditAtMouse && entered_track) {
+ /* With the mouse edit point, paste onto the track under the mouse */
+ ts.push_back (entered_track);
+ } else if (!selection->tracks.empty()) {
+ /* Otherwise, if there are some selected tracks, paste to them */
ts = selection->tracks.filter_to_unique_playlists ();
sort_track_selection (ts);
} else if (_last_cut_copy_source_track) {
- /* otherwise paste to the track that the cut/copy came from;
+ /* Otherwise paste to the track that the cut/copy came from;
see discussion in mantis #3333.
*/
ts.push_back (_last_cut_copy_source_track);
split_regions_at (where, rs);
}
-void
-Editor::ensure_entered_track_selected (bool op_really_wants_one_track_if_none_are_selected)
-{
- if (entered_track && mouse_mode == MouseObject) {
- if (!selection->tracks.empty()) {
- if (!selection->selected (entered_track)) {
- selection->add (entered_track);
- }
- } else {
- /* there is no selection, but this operation requires/prefers selected objects */
-
- if (op_really_wants_one_track_if_none_are_selected) {
- selection->set (entered_track);
- }
- }
- }
-}
-
struct EditorOrderRouteSorter {
bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
/* use of ">" forces the correct sort order */