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
071d831f
Commit
071d831f
authored
Mar 04, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix incorrect handling of mix transition when moving one of the clips to another track
CCBUG: 433527
parent
413b6fa3
Pipeline
#53026
passed with stage
in 10 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
071d831f
...
...
@@ -701,11 +701,6 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
// Clip has a mix
std
::
pair
<
MixInfo
,
MixInfo
>
mixData
=
getTrackById_const
(
old_trackId
)
->
getMixInfo
(
clipId
);
if
(
mixData
.
first
.
firstClipId
>
-
1
)
{
// We have a mix at clip start
sync_mix
=
[
this
,
old_trackId
,
finalMove
]()
{
getTrackById_const
(
old_trackId
)
->
syncronizeMixes
(
finalMove
);
return
true
;
};
if
(
old_trackId
==
trackId
)
{
// We are moving a clip on same track
if
(
finalMove
&&
position
>=
mixData
.
first
.
firstClipInOut
.
second
)
{
...
...
@@ -714,19 +709,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
}
}
else
{
// Clip moved to another track, delete mix
int
subPlaylist
=
m_allClips
[
clipId
]
->
getSubPlaylistIndex
();
update_playlist
=
[
this
,
clipId
,
old_trackId
,
trackId
,
finalMove
]()
{
m_allClips
[
clipId
]
->
setMixDuration
(
0
);
m_allClips
[
clipId
]
->
setSubPlaylistIndex
(
0
,
trackId
);
getTrackById_const
(
old_trackId
)
->
syncronizeMixes
(
finalMove
);
return
true
;
};
bool
isAudio
=
getTrackById_const
(
old_trackId
)
->
isAudioTrack
();
update_playlist_undo
=
[
this
,
clipId
,
subPlaylist
,
mixData
,
old_trackId
,
isAudio
,
finalMove
]()
{
m_allClips
[
clipId
]
->
setSubPlaylistIndex
(
subPlaylist
,
old_trackId
);
bool
result
=
getTrackById_const
(
old_trackId
)
->
createMix
(
mixData
.
first
,
isAudio
);
return
result
;
};
removeMixWithUndo
(
clipId
,
local_undo
,
local_redo
);
}
}
if
(
mixData
.
second
.
firstClipId
>
-
1
)
{
...
...
@@ -746,11 +729,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
// Clip moved to another track, delete mix
// Mix will be deleted by syncronizeMixes operation, only
// re-add it on undo
bool
isAudio
=
getTrackById_const
(
old_trackId
)
->
isAudioTrack
();
update_playlist_undo
=
[
this
,
mixData
,
old_trackId
,
isAudio
]()
{
bool
result
=
getTrackById_const
(
old_trackId
)
->
createMix
(
mixData
.
second
,
isAudio
);
return
result
;
};
removeMixWithUndo
(
mixData
.
second
.
secondClipId
,
local_undo
,
local_redo
);
}
}
}
else
if
(
finalMove
&&
groupMove
&&
isTrack
(
old_trackId
)
&&
getTrackById_const
(
old_trackId
)
->
hasMix
(
clipId
)
&&
old_trackId
==
trackId
)
{
...
...
Eugen Mohr
@emohr
·
Mar 04, 2021
Developer
For issue
#796 (comment 197026)
For issue https://invent.kde.org/multimedia/kdenlive/-/issues/796#note_197026
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