Commit f6774b8e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Color picker: correctly disable clip effect when trying to pick a color from the screen

parent aaf16ed1
......@@ -112,6 +112,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
auto w = AbstractParamWidget::construct(model, index, frameSize, this);
connect(this, &AssetParameterView::initKeyframeView, w, &AbstractParamWidget::slotInitMonitor);
connect(w, &AbstractParamWidget::valueChanged, this, &AssetParameterView::commitChanges);
connect(w, &AbstractParamWidget::disableCurrentFilter, this, &AssetParameterView::disableCurrentFilter);
connect(w, &AbstractParamWidget::seekToPos, this, &AssetParameterView::seekToPos);
connect(w, &AbstractParamWidget::activateEffect, this, &AssetParameterView::activateEffect);
connect(w, &AbstractParamWidget::updateHeight, this, [&]() {
......@@ -177,6 +178,11 @@ void AssetParameterView::resetValues()
}
}
void AssetParameterView::disableCurrentFilter(bool disable)
{
m_model->setParameter(QStringLiteral("disable"), disable ? 1 : 0, true);
}
void AssetParameterView::commitChanges(const QModelIndex &index, const QString &value, bool storeUndo)
{
// Warning: please note that some widgets (for example keyframes) do NOT send the valueChanged signal and do modifications on their own
......
......@@ -104,6 +104,7 @@ private slots:
*/
void commitChanges(const QModelIndex &index, const QString &value, bool storeUndo);
void commitMultipleChanges(const QList <QModelIndex> indexes, const QStringList &values, bool storeUndo);
void disableCurrentFilter(bool disable);
signals:
void seekToPos(int);
......
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