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);
|
Q_UNUSED(propertyList);
|
||||||
|
|
||||||
for (const auto &pair : propertyList) {
|
if (auto timeline = activeTimeline(); timeline.isValid()) {
|
||||||
if (!QmlTimeline::isValidQmlTimeline(pair.first))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (pair.second == "startFrame")
|
auto timelineNode = timeline.modelNode();
|
||||||
updateStartFrame(pair.first);
|
for (const auto &pair : propertyList) {
|
||||||
else if (pair.second == "endFrame")
|
if (!QmlTimeline::isValidQmlTimeline(pair.first))
|
||||||
updateEndFrame(pair.first);
|
continue;
|
||||||
else if (pair.second == "currentFrame")
|
|
||||||
updateCurrentFrame(pair.first);
|
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