diff options
author | David Robillard <d@drobilla.net> | 2014-12-16 14:37:40 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-18 20:23:34 -0500 |
commit | a12a065457a10d9be2582f3ad2fcee7178405981 (patch) | |
tree | e616a88d159606ffcd7150cb7e4164022f85d3eb /gtk2_ardour/editor_ops.cc | |
parent | 026f7bf5b7bd4b28209a2fa9d421a5a73ec29dc4 (diff) |
Fix copy paste of MIDI and track automation.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 77dad5bf29..c09bbcceb8 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4478,46 +4478,27 @@ Editor::paste_internal (framepos_t position, float times) R1.A1, R1.A2, R2, R2.A1, ... */ } + begin_reversible_command (Operations::paste); + if (ts.size() == 1 && cut_buffer->lines.size() == 1 && dynamic_cast<AutomationTimeAxisView*>(ts.front())) { /* Only one line copied, and one automation track selected. Do a "greedy" paste from one automation type to another. */ - begin_reversible_command (Operations::paste); - PasteContext ctx(paste_count, times, ItemCounts(), true); ts.front()->paste (position, *cut_buffer, ctx); - commit_reversible_command (); - - } else if (internal_editing ()) { - - /* undo/redo is handled by individual tracks/regions */ - - RegionSelection rs; - get_regions_at (rs, position, ts); - - PasteContext ctx(paste_count, times, ItemCounts(), false); - for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) { - MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (*r); - if (mrv) { - mrv->paste (position, *cut_buffer, ctx); - } - } - } else { - /* we do redo (do you do voodoo?) */ - - begin_reversible_command (Operations::paste); + /* Paste into tracks */ PasteContext ctx(paste_count, times, ItemCounts(), false); for (TrackViewList::iterator i = ts.begin(); i != ts.end(); ++i) { (*i)->paste (position, *cut_buffer, ctx); } - - commit_reversible_command (); } + + commit_reversible_command (); } void |