Skip to content
GitLab
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
f9d31a61
Commit
f9d31a61
authored
May 17, 2019
by
Jean-Baptiste Mardelle
Browse files
Don't invalidate timeline/refresh monitor on audio effects
parent
321f45f6
Pipeline
#3594
passed with stage
in 14 minutes and 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/assets/model/assetparametermodel.cpp
View file @
f9d31a61
...
...
@@ -43,6 +43,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
Q_ASSERT
(
m_asset
->
is_valid
());
QDomNodeList
nodeList
=
assetXml
.
elementsByTagName
(
QStringLiteral
(
"parameter"
));
m_hideKeyframesByDefault
=
assetXml
.
hasAttribute
(
QStringLiteral
(
"hideKeyframes"
));
m_isAudio
=
assetXml
.
attribute
(
QStringLiteral
(
"type"
))
==
QLatin1String
(
"audio"
);
bool
needsLocaleConversion
=
false
;
QChar
separator
,
oldSeparator
;
...
...
@@ -187,10 +188,12 @@ void AssetParameterModel::setParameter(const QString &name, int value, bool upda
emit
dataChanged
(
index
(
0
,
0
),
index
(
m_rows
.
count
()
-
1
,
0
),
{});
// Update fades in timeline
pCore
->
updateItemModel
(
m_ownerId
,
m_assetId
);
// Trigger monitor refresh
pCore
->
refreshProjectItem
(
m_ownerId
);
// Invalidate timeline preview
pCore
->
invalidateItem
(
m_ownerId
);
if
(
!
m_isAudio
)
{
// Trigger monitor refresh
pCore
->
refreshProjectItem
(
m_ownerId
);
// Invalidate timeline preview
pCore
->
invalidateItem
(
m_ownerId
);
}
}
}
...
...
@@ -279,10 +282,12 @@ void AssetParameterModel::setParameter(const QString &name, const QString ¶m
}
else
{
// Update fades in timeline
pCore
->
updateItemModel
(
m_ownerId
,
m_assetId
);
// Trigger monitor refresh
pCore
->
refreshProjectItem
(
m_ownerId
);
// Invalidate timeline preview
pCore
->
invalidateItem
(
m_ownerId
);
if
(
!
m_isAudio
)
{
// Trigger monitor refresh
pCore
->
refreshProjectItem
(
m_ownerId
);
// Invalidate timeline preview
pCore
->
invalidateItem
(
m_ownerId
);
}
}
}
...
...
src/assets/model/assetparametermodel.hpp
View file @
f9d31a61
...
...
@@ -210,6 +210,8 @@ protected:
std
::
shared_ptr
<
KeyframeModelList
>
m_keyframes
;
// if true, keyframe tools will be hidden by default
bool
m_hideKeyframesByDefault
;
// true if this is an audio effect, used to prevent unnecessary monitor refresh / timeline invalidate
bool
m_isAudio
;
/* @brief Set the parameter with given name to the given value. This should be called when first
* building an effect in the constructor, so that we don't call shared_from_this
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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