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
6b93a374
Commit
6b93a374
authored
Oct 03, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix saving lift/gamma/gain effect results in broken ui.
Fixes
#790
parent
838bf7a6
Pipeline
#36367
passed with stage
in 29 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/assets/model/assetparametermodel.cpp
View file @
6b93a374
...
...
@@ -251,6 +251,12 @@ QStringList AssetParameterModel::getKeyframableParameters() const
return
paramNames
;
}
const
QString
AssetParameterModel
::
getParam
(
const
QString
&
paramName
)
{
Q_ASSERT
(
m_asset
->
is_valid
());
return
m_asset
->
get
(
paramName
.
toUtf8
().
constData
());
}
void
AssetParameterModel
::
setParameter
(
const
QString
&
name
,
int
value
,
bool
update
)
{
Q_ASSERT
(
m_asset
->
is_valid
());
...
...
src/assets/model/assetparametermodel.hpp
View file @
6b93a374
...
...
@@ -185,6 +185,9 @@ public:
/* @brief Returns a list of the parameter names that are keyframable */
QStringList
getKeyframableParameters
()
const
;
/** @brief Returns the current value of an effect parameter */
const
QString
getParam
(
const
QString
&
paramName
);
protected:
/* @brief Helper function to retrieve the type of a parameter given the string corresponding to it*/
static
ParamType
paramTypeFromStr
(
const
QString
&
type
);
...
...
src/assets/view/assetparameterview.cpp
View file @
6b93a374
...
...
@@ -85,7 +85,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
});
emit
updatePresets
();
connect
(
m_model
.
get
(),
&
AssetParameterModel
::
dataChanged
,
this
,
&
AssetParameterView
::
refresh
);
if
(
paramTag
.
endsWith
(
QStringLiteral
(
"lift_gamma_gain"
)))
{
if
(
paramTag
.
endsWith
(
QStringLiteral
(
"lift_gamma_gain"
))
||
m_model
->
getParam
(
QStringLiteral
(
"mlt_service"
)).
endsWith
(
QStringLiteral
(
"lift_gamma_gain"
))
)
{
// Special case, the colorwheel widget manages several parameters
QModelIndex
index
=
model
->
index
(
0
,
0
);
auto
w
=
AbstractParamWidget
::
construct
(
model
,
index
,
frameSize
,
this
);
...
...
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