Revert composition sorting to match previous stable behavior

parent 8a1fc777
Pipeline #3389 passed with stage
in 13 minutes and 45 seconds
......@@ -135,7 +135,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
// Sort compositions and insert
bool compositionOk = true;
if (!compositions.isEmpty()) {
std::sort(compositions.begin(), compositions.end(), [](Mlt::Transition *a, Mlt::Transition *b) { return a->get_b_track() < b->get_b_track(); });
std::sort(compositions.begin(), compositions.end(), [](Mlt::Transition *a, Mlt::Transition *b) { return a->get_b_track() > b->get_b_track(); });
while (!compositions.isEmpty()) {
QScopedPointer<Mlt::Transition> t(compositions.takeFirst());
auto transProps = std::make_unique<Mlt::Properties>(t->get_properties());
......
......@@ -2477,7 +2477,7 @@ bool TimelineModel::replantCompositions(int currentCompo, bool updateView)
}
}
// sort by decreasing b_track
std::sort(compos.begin(), compos.end(), [](const std::pair<int, int> &a, const std::pair<int, int> &b) { return a.first < b.first; });
std::sort(compos.begin(), compos.end(), [](const std::pair<int, int> &a, const std::pair<int, int> &b) { return a.first > b.first; });
// replant
QScopedPointer<Mlt::Field> field(m_tractor->field());
field->lock();
......
Markdown is supported
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