Fix crash on disable effect. Fixes #43

parent 2796c838
......@@ -195,14 +195,10 @@ void EffectItemModel::updateEnable()
{
filter().set("disable", isEnabled() ? 0 : 1);
pCore->refreshProjectItem(m_ownerId);
if (auto ptr = m_model.lock()) {
QModelIndex index = ptr->getIndexFromId(m_id);
emit dataChanged(index, index, QVector<int>());
emit enabledChange(!isEnabled());
} else {
qDebug() << "Error, unable to send update to deleted model";
Q_ASSERT(false);
}
const QModelIndex start = AssetParameterModel::index(0, 0);
const QModelIndex end = AssetParameterModel::index(rowCount() - 1, 0);
emit dataChanged(start, end, QVector<int>());
emit enabledChange(!isEnabled());
// Update timeline child producers
AssetParameterModel::updateChildren(QStringLiteral("disable"));
}
......
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