Skip to content

Commit 0d871d2

Browse files
committed
Fix Crash after moving clip without filter
As reported here: https://forum.shotcut.org/t/crash-after-moving-clip-without-filter/47466
1 parent 0e8ec55 commit 0d871d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/commands/timelinecommands.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,12 @@ bool MoveClipCommand::mergeWith(const QUndoCommand *other)
789789
if (that->m_undoHelper.affectedTracks() != m_undoHelper.affectedTracks()) {
790790
return false;
791791
}
792+
if (that->m_trackDelta || m_trackDelta) {
793+
// Do not merge move commands if the move is between tracks.
794+
// In particular, if a clip is moved to a track and then back to the origional track,
795+
// there is no change and a single undo command is left with nothing to undo.
796+
return false;
797+
}
792798
auto thisIterator = m_clips.begin();
793799
auto thatIterator = that->m_clips.begin();
794800
while (thisIterator != m_clips.end() && thatIterator != that->m_clips.end()) {

0 commit comments

Comments
 (0)