forked from qt-creator/qt-creator
Do not update animation range from inactive timelines
In a scene with multiple states and timelines it occasionally happend that the curve editor was updated from an inactive timeline. This is now fixed. Fixes: QDS-6948 Change-Id: I586593452e69cebe7bb2571e301230bf0ace8631 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -149,16 +149,23 @@ void CurveEditorView::instancePropertyChanged(const QList<QPair<ModelNode, Prope
|
||||
{
|
||||
Q_UNUSED(propertyList);
|
||||
|
||||
for (const auto &pair : propertyList) {
|
||||
if (!QmlTimeline::isValidQmlTimeline(pair.first))
|
||||
continue;
|
||||
if (auto timeline = activeTimeline(); timeline.isValid()) {
|
||||
|
||||
if (pair.second == "startFrame")
|
||||
updateStartFrame(pair.first);
|
||||
else if (pair.second == "endFrame")
|
||||
updateEndFrame(pair.first);
|
||||
else if (pair.second == "currentFrame")
|
||||
updateCurrentFrame(pair.first);
|
||||
auto timelineNode = timeline.modelNode();
|
||||
for (const auto &pair : propertyList) {
|
||||
if (!QmlTimeline::isValidQmlTimeline(pair.first))
|
||||
continue;
|
||||
|
||||
if (pair.first != timelineNode)
|
||||
continue;
|
||||
|
||||
if (pair.second == "startFrame")
|
||||
updateStartFrame(pair.first);
|
||||
else if (pair.second == "endFrame")
|
||||
updateEndFrame(pair.first);
|
||||
else if (pair.second == "currentFrame")
|
||||
updateCurrentFrame(pair.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user