+ view->session()->set_dirty ();
+ }
+}
+
+bool
+AutomationRegionView::paste (samplepos_t pos,
+ unsigned paste_count,
+ float times,
+ boost::shared_ptr<const ARDOUR::AutomationList> slist)
+{
+ using namespace ARDOUR;
+
+ AutomationTimeAxisView* const view = automation_view();
+ boost::shared_ptr<ARDOUR::AutomationList> my_list = _line->the_list();
+
+ if (view->session()->transport_rolling() && my_list->automation_write()) {
+ /* do not paste if this control is in write mode and we're rolling */
+ return false;
+ }
+
+ AutomationType src_type = (AutomationType)slist->parameter().type ();
+ double len = slist->length();
+
+ /* add multi-paste offset if applicable */
+ if (parameter_is_midi (src_type)) {
+ // convert length to samples (incl tempo-ramps)
+ len = DoubleBeatsSamplesConverter (view->session()->tempo_map(), pos).to (len * paste_count);
+ pos += view->editor ().get_paste_offset (pos, paste_count > 0 ? 1 : 0, len);
+ } else {
+ pos += view->editor ().get_paste_offset (pos, paste_count, len);
+ }