Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
e9a62a1c
Commit
e9a62a1c
authored
May 27, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix tests and mix direction regression
parent
919596ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/trackmodel.cpp
View file @
e9a62a1c
...
...
@@ -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
)
{
...
...
tests/mixtest.cpp
View file @
e9a62a1c
...
...
@@ -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
...
...
tests/movetest.cpp
View file @
e9a62a1c
#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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment