13
0

Fix bug: sequential pasting to the same time, but different tracks, would trigger paste offset.

This commit is contained in:
Ben Loftis 2018-02-26 19:40:24 -06:00
parent a699a637e4
commit 292f998298
2 changed files with 8 additions and 4 deletions

View File

@ -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 ();
}

View File

@ -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);
}