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

Fix error and corruption loading reverted mixes

parent b9c9e4b4
......@@ -2498,7 +2498,7 @@ bool TrackModel::loadMix(Mlt::Transition *t)
}
} else {
int firstClipIn = m_allClips[cid1]->getPosition();
if (in == firstClipIn) {
if (in == firstClipIn && in != m_allClips[cid2]->getPosition()) {
// Incorrecty detected revert mix
std::swap(cid1, cid2);
}
......@@ -2762,7 +2762,7 @@ bool TrackModel::hasClipStart(int pos)
if (m_playlist.is_blank_at(pos)) {
continue;
}
if (m_playlist.get_clip_index_at(pos) != m_playlist.get_clip_index_at(pos - 1)) {
if (pos == 0 || m_playlist.get_clip_index_at(pos) != m_playlist.get_clip_index_at(pos - 1)) {
return true;
}
}
......
......@@ -45,7 +45,7 @@ Item{
if (model.mixDuration > 0) {
// Clips with mix should be ordered related to their position so that the right clip of a clip mix is always on top (the mix UI is drawn over the right clip)
return model.start / 25;
return Math.round(model.start / 25) + 1;
}
if (root.activeTool === ProjectTool.SlipTool && model.selected) {
......
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