summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-26 19:40:24 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-26 19:40:24 -0600
commit292f998298bfb83b4f8b3f2c537cbff307cb6a22 (patch)
tree599cb751c7bf98c4b1c8e001fdfeacef686a4dc9
parenta699a637e44e6a4f59488868a031667d2a283c8e (diff)
Fix bug: sequential pasting to the same time, but different tracks, would trigger paste offset.
-rw-r--r--gtk2_ardour/editor_ops.cc7
-rw-r--r--gtk2_ardour/editor_selection.cc5
2 files changed, 8 insertions, 4 deletions
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);
}