From bbb3624399e2683864e34c51f7d5f00968f25685 Mon Sep 17 00:00:00 2001 From: Spekular Date: Sun, 23 Feb 2020 14:01:40 +0100 Subject: [PATCH] Bias dropped clip position backwards --- src/core/Track.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 5c61dc5ab..cb430da96 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -1620,9 +1620,13 @@ bool TrackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * de ) // TODO -- Need to draw the hovericon either way, or ghost the TCOs // onto their final position. + float snapSize = gui->songEditor()->m_editor->getSnapSize(); // All patterns should be offset the same amount as the grabbed pattern + MidiTime offset = MidiTime(tcoPos - grabbedTCOPos); + // Users expect clips to "fall" backwards, so bias the offset + offset = offset - MidiTime::ticksPerBar() * snapSize / 2; // The offset is quantized (rather than the positions) to preserve fine adjustments - int offset = MidiTime(tcoPos - grabbedTCOPos).quantize(gui->songEditor()->m_editor->getSnapSize()); + offset = offset.quantize(snapSize); for( int i = 0; i