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

Fix tests and mix direction regression

parent 82dc7c71
Pipeline #181412 failed with stage
in 6 minutes and 21 seconds
......@@ -1971,6 +1971,9 @@ bool TrackModel::requestClipMix(const QString &mixId, std::pair<int, int> clipId
t->set("kdenlive:mixcut", secondClipCut);
t->set("start", -1);
t->set("accepts_blanks", 1);
if (dest_track == 0) {
t->set("reverse", 1);
}
m_track->plant_transition(*t.get(), 0, 1);
assetName = QStringLiteral("mix");
xml = TransitionsRepository::get()->getXml(assetName);
......@@ -1981,6 +1984,9 @@ bool TrackModel::requestClipMix(const QString &mixId, std::pair<int, int> clipId
xml = TransitionsRepository::get()->getXml(assetName);
t->set("kdenlive:mixcut", secondClipCut);
t->set("kdenlive_id", "luma");
if (dest_track == 0) {
t->set("reverse", 1);
}
m_track->plant_transition(*t.get(), 0, 1);
}
if (dest_track == 0) {
......
......@@ -383,16 +383,20 @@ TEST_CASE("Simple Mix", "[SameTrackMix]")
state0b();
// Resize clip, should resize the mix
// CID 1 length=10, pos=100, CID2 length=20, pos=130, CID5 length=20, pos=130
// Create mix between cid1 and cid2
REQUIRE(timeline->mixClip(cid2));
state1b();
REQUIRE(timeline->getTrackById_const(tid2)->mixIsReversed(cid2) == false);
int audio2 = timeline->getClipSplitPartner(cid2);
REQUIRE(timeline->getTrackById_const(tid3)->mixIsReversed(audio2) == false);
// Create mix between cid2 and cid5
REQUIRE(timeline->mixClip(cid5));
REQUIRE(timeline->getTrackById_const(tid2)->mixIsReversed(cid2) == false);
REQUIRE(timeline->getTrackById_const(tid2)->mixIsReversed(cid5) == true);
REQUIRE(timeline->getTrackById_const(tid3)->mixIsReversed(audio2) == false);
int audio5 = timeline->getClipSplitPartner(cid5);
REQUIRE(timeline->getTrackById_const(tid3)->mixIsReversed(audio5) == true);
// Undo cid5 mix
......
#include "catch.hpp"
#include "doc/docundostack.hpp"
#include "test_utils.hpp"
#include "definitions.h"
#define private public
#define protected public
#include "core.h"
using namespace fakeit;
Mlt::Profile profile_move;
......@@ -46,7 +53,7 @@ TEST_CASE("Cut undo/redo", "[MoveClips]")
int cid2;
int cid3;
int cid4;
int cid5;
REQUIRE(timeline->requestClipInsertion(binId, tid2, 100, cid1));
cid2 = timeline->getClipSplitPartner(cid1);
......
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