Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
dbec1372
Commit
dbec1372
authored
May 12, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multi stream clips: drag all active streams in timeline.
Related to
#382
parent
89cec14e
Pipeline
#20055
passed with stage
in 9 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+24
-1
No files found.
src/timeline2/model/timelinemodel.cpp
View file @
dbec1372
...
...
@@ -1069,15 +1069,38 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
mirror
=
-
1
;
}
bool
canMirrorDrop
=
!
useTargets
&&
mirror
>
-
1
;
QMap
<
int
,
int
>
dropTargets
;
if
(
res
&&
(
canMirrorDrop
||
!
target_track
.
isEmpty
())
&&
master
->
hasAudioAndVideo
())
{
if
(
!
useTargets
)
{
int
streamsCount
=
m_audioTarget
.
keys
().
count
();
target_track
=
{
mirror
};
QList
<
int
>
audioTids
=
getLowerTracksId
(
mirror
,
TrackType
::
AudioTrack
);
if
(
streamsCount
>
audioTids
.
count
()
+
1
)
{
pCore
->
displayMessage
(
i18n
(
"Not enough audio tracks for all streams (%1)"
,
streamsCount
),
ErrorMessage
);
res
=
false
;
}
else
{
while
(
streamsCount
>
1
&&
!
audioTids
.
isEmpty
())
{
target_track
<<
audioTids
.
takeFirst
();
streamsCount
--
;
}
}
QList
<
int
>
aTargets
=
m_audioTarget
.
values
();
std
::
sort
(
aTargets
.
begin
(),
aTargets
.
end
());
for
(
int
i
=
0
;
i
<
target_track
.
count
();
++
i
)
{
dropTargets
.
insert
(
target_track
.
at
(
i
),
aTargets
.
at
(
i
));
}
}
if
(
target_track
.
isEmpty
())
{
// No available track for splitting, abort
pCore
->
displayMessage
(
i18n
(
"No available track for split operation"
),
ErrorMessage
);
res
=
false
;
}
if
(
!
res
)
{
bool
undone
=
local_undo
();
Q_ASSERT
(
undone
);
id
=
-
1
;
return
false
;
}
// Process all mirror insertions
std
::
function
<
bool
(
void
)
>
audio_undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
audio_redo
=
[]()
{
return
true
;
};
...
...
@@ -1085,7 +1108,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
for
(
int
&
target_ix
:
target_track
)
{
if
(
!
audioDrop
)
{
if
(
!
useTargets
)
{
audioStream
=
master
->
getProducerIntProperty
(
"audio_index"
);
audioStream
=
dropTargets
.
value
(
target_ix
);
//
master->getProducerIntProperty("audio_index");
}
else
{
audioStream
=
m_audioTarget
.
value
(
target_ix
);
}
...
...
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