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

Don't update keyframe parameters when changing a keyframe selection state

parent e0bee1ab
Pipeline #231660 passed with stage
in 13 minutes and 10 seconds
......@@ -44,7 +44,14 @@ void KeyframeModel::setup()
connect(this, &KeyframeModel::rowsRemoved, this, &KeyframeModel::modelChanged);
connect(this, &KeyframeModel::rowsInserted, this, &KeyframeModel::modelChanged);
connect(this, &KeyframeModel::modelReset, this, &KeyframeModel::modelChanged);
connect(this, &KeyframeModel::dataChanged, this, &KeyframeModel::modelChanged);
connect(this, &KeyframeModel::dataChanged, this, [this](const QModelIndex &, const QModelIndex &, const QVector<int> &roles) {
QVector<int> notParamRoles = {SelectedRole, ActiveRole};
if (roles.size() == 1 && notParamRoles.contains(roles.first())) {
// Selection role changed, no need to update the keyframe parameters
return;
}
emit modelChanged();
});
connect(this, &KeyframeModel::modelChanged, this, &KeyframeModel::sendModification);
}
......
Supports Markdown
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