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
18e3e6d5
Commit
18e3e6d5
authored
May 17, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix extra audio stream incorrectly inserted on drop
parent
deeb0b05
Pipeline
#20319
passed with stage
in 9 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
18e3e6d5
...
...
@@ -1145,7 +1145,8 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
qDebug
()
<<
"=== AUDIO DROP; BELOW TK: "
<<
trackId
;
audioTids
=
getLowerTracksId
(
trackId
,
TrackType
::
AudioTrack
);
}
streamsCount
=
m_binAudioTargets
.
keys
().
count
()
+
(
audioDrop
?
-
1
:
0
);
// First audio stream already inserted in target_track or in timeline
streamsCount
=
m_binAudioTargets
.
keys
().
count
()
-
1
;
qDebug
()
<<
"=== GOT AUDIO STRAMS: "
<<
streamsCount
<<
"
\n
AUDIO IDS: "
<<
audioTids
;
while
(
streamsCount
>
0
&&
!
audioTids
.
isEmpty
())
{
...
...
@@ -1156,7 +1157,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
if
(
audioDrop
)
{
aTargets
.
removeAll
(
audioStream
);
}
qDebug
()
<<
"========
\n
POSSIBLE TARGET TKS: "
<<
target_track
<<
"
\n
RQSTED AUDIO TARGETS: "
<<
aTargets
<<
"
\n
==========="
;
//
qDebug()<<"========\nPOSSIBLE TARGET TKS: "<<target_track<<"\nRQSTED AUDIO TARGETS: "<<aTargets<<"\n===========";
std
::
sort
(
aTargets
.
begin
(),
aTargets
.
end
());
for
(
int
i
=
0
;
i
<
target_track
.
count
()
&&
i
<
aTargets
.
count
()
;
++
i
)
{
dropTargets
.
insert
(
target_track
.
at
(
i
),
aTargets
.
at
(
i
));
...
...
@@ -1164,7 +1165,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
if
(
audioDrop
)
{
target_track
<<
mirror
;
}
qDebug
()
<<
"==== GOT DROP AUDIO TARGETS: "
<<
dropTargets
;
//
qDebug()<<"==== GOT DROP AUDIO TARGETS: "<<dropTargets
<<", FINAL TARGET TKS: "<<target_track
;
}
if
(
target_track
.
isEmpty
())
{
// No available track for splitting, abort
...
...
Write
Preview
Markdown
is supported
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