Commit 712a74e1 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix incorrect mix deletion when moving a mixed clip on same track

parent 52725481
Pipeline #95019 canceled with stage
......@@ -747,7 +747,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
if (old_trackId == trackId) {
int mixCut = m_allClips[clipId]->getMixCutPosition();
// We are moving a clip on same track
if (position > mixData.first.secondClipInOut.first - mixCut) {
if (position > mixData.first.secondClipInOut.first - mixCut || position < mixData.first.firstClipInOut.first) {
position += m_allClips[clipId]->getMixDuration() - mixCut;
removeMixWithUndo(clipId, local_undo, local_redo);
}
......@@ -765,7 +765,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
};*/
if (old_trackId == trackId) {
int mixEnd = m_allClips[mixData.second.secondClipId]->getPosition() + m_allClips[mixData.second.secondClipId]->getMixDuration();
if (finalMove && mixEnd > position + m_allClips[clipId]->getPlaytime()) {
if (position > mixEnd || position < m_allClips[mixData.second.secondClipId]->getPosition()) {
// Moved outside mix zone
removeMixWithUndo(mixData.second.secondClipId, local_undo, local_redo);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment