Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
a508e86c
Commit
a508e86c
authored
Aug 29, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix insert broken in some configurations (video disabled)
parent
c4966aac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+15
-7
No files found.
src/timeline2/model/timelinemodel.cpp
View file @
a508e86c
...
...
@@ -1065,6 +1065,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
binIdWithInOut
.
remove
(
0
,
1
);
}
if
(
!
pCore
->
projectItemModel
()
->
hasClip
(
bid
))
{
qDebug
()
<<
"=== NO CLIP FOUND IN BIN FOR ID: "
<<
bid
;
return
false
;
}
...
...
@@ -1086,22 +1087,29 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
useTargets
=
false
;
}
if
((
dropType
==
PlaylistState
::
Disabled
||
dropType
==
PlaylistState
::
AudioOnly
)
&&
(
type
==
ClipType
::
AV
||
type
==
ClipType
::
Playlist
))
{
bool
useAudioTarget
=
false
;
if
(
useTargets
&&
!
m_audioTarget
.
isEmpty
()
&&
m_videoTarget
==
-
1
)
{
// If audio target is set but no video target, only insert audio
trackId
=
m_audioTarget
.
firstKey
();
if
(
trackId
>
-
1
&&
(
getTrackById_const
(
trackId
)
->
isLocked
()
||
!
allowedTracks
.
contains
(
trackId
)))
{
trackId
=
-
1
;
}
useAudioTarget
=
true
;
}
else
if
(
useTargets
&&
(
getTrackById_const
(
trackId
)
->
isLocked
()
||
!
allowedTracks
.
contains
(
trackId
)))
{
// Video target set but locked
trackId
=
m_audioTarget
.
firstKey
();
if
(
trackId
>
-
1
&&
(
getTrackById_const
(
trackId
)
->
isLocked
()
||
!
allowedTracks
.
contains
(
trackId
)))
{
trackId
=
-
1
;
useAudioTarget
=
true
;
}
if
(
useAudioTarget
)
{
// Find first possible audio target
QList
<
int
>
audioTargetTracks
=
m_audioTarget
.
keys
();
trackId
=
-
1
;
for
(
int
tid
:
audioTargetTracks
)
{
if
(
tid
>
-
1
&&
!
getTrackById_const
(
tid
)
->
isLocked
()
&&
allowedTracks
.
contains
(
tid
))
{
trackId
=
tid
;
break
;
}
}
}
if
(
trackId
==
-
1
)
{
if
(
!
allowedTracks
.
isEmpty
())
{
// No active tracks, aborting
qDebug
()
<<
"=== NO ACTIVE TRACK FOUND; ABORTING!!!"
;
return
true
;
}
pCore
->
displayMessage
(
i18n
(
"No available track for insert operation"
),
ErrorMessage
);
...
...
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