diff options
author | Carl Hetherington <carl@carlh.net> | 2011-04-19 10:18:04 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-04-19 10:18:04 +0000 |
commit | 8560c029f084cc3ff26e08077e62bb7e49f26b81 (patch) | |
tree | 4cba225a19470faf78fd518820d62f2eeceafc49 /gtk2_ardour | |
parent | 65a90ccffc81e5807479b50473cdfc85d4ec574c (diff) |
Sort track selections before cut/copying their playlists, so that the list of selected playlists is in the same order as their parent tracks are in the editor. Fixes range copy/paste onto several tracks (#3984).
git-svn-id: svn://localhost/ardour2/branches/3.0@9370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 252c03a8ac..935694a640 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3831,6 +3831,13 @@ Editor::cut_copy_ranges (CutCopyOp op) TrackViewList* ts; TrackViewList entered; + /* Sort the track selection now, so that it if is used, the playlists + selected by the calls below to cut_copy_clear are in the order that + their tracks appear in the editor. This makes things like paste + of ranges work properly. + */ + sort_track_selection (&selection->tracks); + if (selection->tracks.empty()) { if (!entered_track) { return; @@ -3899,7 +3906,7 @@ Editor::paste_internal (framepos_t position, float times) ts = selection->tracks; } else if (_last_cut_copy_source_track) { /* otherwise paste to the track that the cut/copy came from; - see discussion in mants #3333. + see discussion in mantis #3333. */ ts.push_back (_last_cut_copy_source_track); } |