Fix effect stack incorrectly enabled/disabled. Fixes #50

parent b7d5bd14
......@@ -115,8 +115,7 @@ CollapsibleEffectView::CollapsibleEffectView(std::shared_ptr<EffectItemModel> ef
m_enabledButton->setActiveIcon(QIcon::fromTheme(QStringLiteral("hint")));
m_enabledButton->setInactiveIcon(QIcon::fromTheme(QStringLiteral("visibility")));
enabledButton->setDefaultAction(m_enabledButton);
connect(m_model.get(), &AssetParameterModel::enabledChange, m_enabledButton, &KDualAction::setActive);
connect(m_model.get(), &AssetParameterModel::enabledChange, this, &CollapsibleEffectView::enableView);
m_groupAction = new QAction(QIcon::fromTheme(QStringLiteral("folder-new")), i18n("Create Group"), this);
connect(m_groupAction, &QAction::triggered, this, &CollapsibleEffectView::slotCreateGroup);
......@@ -785,3 +784,18 @@ void CollapsibleEffectView::prepareImportClipKeyframes()
{
emit importClipKeyframes(AVWidget, m_itemInfo, m_effect.cloneNode().toElement(), QMap<QString, QString>());
}
void CollapsibleEffectView::enableView(bool enabled)
{
m_enabledButton->setActive(enabled);
title->setEnabled(!enabled);
m_colorIcon->setEnabled(!enabled);
if (enabled) {
if (KdenliveSettings::disable_effect_parameters()) {
widgetFrame->setEnabled(false);
}
} else {
widgetFrame->setEnabled(true);
}
}
......@@ -94,6 +94,7 @@ public slots:
private slots:
void setWidgetHeight(qreal value);
void animationFinished();
void enableView(bool enabled);
private slots:
void slotSwitch(bool expand);
......
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