diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index fba1e2de28..1773b33b19 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -4774,10 +4774,7 @@ Editor::paste_internal (samplepos_t position, float times, const int32_t sub_num DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("preferred edit position is %1\n", position)); } - if (position == last_paste_pos) { - /* repeated paste in the same position */ - ++paste_count; - } else { + if (position != last_paste_pos) { /* paste in new location, reset repeated paste state */ paste_count = 0; last_paste_pos = position; @@ -4866,6 +4863,8 @@ Editor::paste_internal (samplepos_t position, float times, const int32_t sub_num } } + ++paste_count; + commit_reversible_command (); } diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 95cba60704..6ee5dc0f38 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -1158,6 +1158,11 @@ Editor::presentation_info_changed (PropertyChange const & what_changed) void Editor::track_selection_changed () { +cout << "resetting paste count" << endl; + /* reset paste count, so the plaste location doesn't get incremented + * if we want to paste in the same place, but different track. */ + paste_count = 0; + if ( _session->solo_selection_active() ) play_solo_selection(false); }