From 09ee5c7f1f1d69265b34e528afa9daa5730bac24 Mon Sep 17 00:00:00 2001 From: Spekular Date: Sun, 13 Dec 2020 16:40:57 +0100 Subject: [PATCH] Fix #5840 (#5844) If copying to another track, allow same start and end position. --- src/gui/widgets/TrackContentWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/TrackContentWidget.cpp b/src/gui/widgets/TrackContentWidget.cpp index 7064b1e7540..5dd237948e9 100644 --- a/src/gui/widgets/TrackContentWidget.cpp +++ b/src/gui/widgets/TrackContentWidget.cpp @@ -508,7 +508,7 @@ bool TrackContentWidget::pasteSelection( TimePos tcoPos, const QMimeData * md, b TimePos pos = tcoElement.attributeNode( "pos" ).value().toInt() + offset; // If we land on ourselves, offset by one snap TimePos shift = TimePos::ticksPerBar() * gui->songEditor()->m_editor->getSnapSize(); - if (offset == 0) { pos += shift; } + if (offset == 0 && initialTrackIndex == currentTrackIndex) { pos += shift; } TrackContentObject * tco = t->createTCO( pos ); tco->restoreState( tcoElement );