diff options
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index c84bae6ad4..69fcf67d16 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4440,26 +4440,25 @@ Editor::paste_internal (framepos_t position, float times) R1.A1, R1.A2, R2, R2.A1, ... */ } - if (internal_editing ()) { + 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); - if (ts.size() == 1 && cut_buffer->lines.size() == 1) { - AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*>(ts.front()); - if (atv) { - /* Only one line, and one automation track selected. Do a - "greedy" paste from one automation type to another. */ - PasteContext ctx(paste_count, times, ItemCounts(), true); - begin_reversible_command (Operations::paste); - atv->paste (position, *cut_buffer, ctx); - commit_reversible_command (); - return; - } - } - PasteContext ctx(paste_count, times, ItemCounts(), false); for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) { MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (*r); |