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
9ffe8614
Commit
9ffe8614
authored
Nov 13, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix video only clips displaying audio icon
parent
0ab11827
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
9ffe8614
...
...
@@ -136,6 +136,7 @@ ProjectClip::ProjectClip(const QString &id, const QDomElement &description, cons
:
AbstractProjectItem
(
AbstractProjectItem
::
ClipItem
,
id
,
model
)
,
ClipController
(
id
)
,
m_resetTimelineOccurences
(
false
)
,
m_audioCount
(
0
)
{
m_clipStatus
=
FileStatus
::
StatusWaiting
;
m_thumbnail
=
thumb
;
...
...
@@ -1660,9 +1661,11 @@ void ProjectClip::registerTimelineClip(std::weak_ptr<TimelineModel> timeline, in
{
Q_ASSERT
(
m_registeredClips
.
count
(
clipId
)
==
0
);
Q_ASSERT
(
!
timeline
.
expired
());
if
(
auto
ptr
=
timeline
.
lock
())
{
if
(
ptr
->
getClipState
(
clipId
)
==
PlaylistState
::
AudioOnly
)
{
m_audioCount
++
;
if
(
m_hasAudio
)
{
if
(
auto
ptr
=
timeline
.
lock
())
{
if
(
ptr
->
getClipState
(
clipId
)
==
PlaylistState
::
AudioOnly
)
{
m_audioCount
++
;
}
}
}
m_registeredClips
[
clipId
]
=
std
::
move
(
timeline
);
...
...
@@ -1673,7 +1676,7 @@ void ProjectClip::deregisterTimelineClip(int clipId, bool audioClip)
{
qDebug
()
<<
" ** * DEREGISTERING TIMELINE CLIP: "
<<
clipId
;
Q_ASSERT
(
m_registeredClips
.
count
(
clipId
)
>
0
);
if
(
audioClip
)
{
if
(
m_hasAudio
&&
audioClip
)
{
m_audioCount
--
;
}
m_registeredClips
.
erase
(
clipId
);
...
...
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