Fix saving lift/gamma/gain effect results in broken ui.

Fixes #790
parent 5034c4fe
......@@ -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());
......
......@@ -183,6 +183,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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment