summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 2c342fb8c9..e0e9b9428f 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -637,7 +637,7 @@ AutomationTimeAxisView::add_automation_event (GdkEvent* event, framepos_t when,
* @param nth Index of the AutomationList within the selection to paste from.
*/
bool
-AutomationTimeAxisView::paste (framepos_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste (framepos_t pos, unsigned paste_count, float times, Selection& selection, size_t nth)
{
boost::shared_ptr<AutomationLine> line;
@@ -651,11 +651,11 @@ AutomationTimeAxisView::paste (framepos_t pos, float times, Selection& selection
return false;
}
- return paste_one (*line, pos, times, selection, nth);
+ return paste_one (*line, pos, paste_count, times, selection, nth);
}
bool
-AutomationTimeAxisView::paste_one (AutomationLine& line, framepos_t pos, float times, Selection& selection, size_t nth)
+AutomationTimeAxisView::paste_one (AutomationLine& line, framepos_t pos, unsigned paste_count, float times, Selection& selection, size_t nth)
{
AutomationSelection::iterator p;
boost::shared_ptr<AutomationList> alist(line.the_list());
@@ -671,6 +671,9 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, framepos_t pos, float t
return false;
}
+ /* add multi-paste offset if applicable */
+ pos += _editor.get_paste_offset(pos, paste_count, (*p)->length());
+
double const model_pos = line.time_converter().from (pos - line.time_converter().origin_b ());
XMLNode &before = alist->get_state();