aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKnud Dollereder <knud.dollereder@qt.io>2022-05-06 14:28:20 +0200
committerKnud Dollereder <knud.dollereder@qt.io>2022-05-13 09:46:43 +0000
commit4d58f8dee8ff82fe6134f6b9a0a8a6dd597b778d (patch)
tree0865bb74b402209d4e652326a071539154e5fe03
parent9be10225cc5a85a87e70638952e742ba5dab2503 (diff)
Make the curveeditor state aware
Fixes: QDS-6872 Change-Id: I2fe733bf6c25d3517ff80d122977113e10bac627 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp
index c449d0e864..eee4b69db6 100644
--- a/src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp
@@ -215,10 +215,9 @@ QmlTimeline CurveEditorView::activeTimeline() const
if (node.hasVariantProperty("enabled")
&& node.variantProperty("enabled").value().toBool())
return QmlTimeline(node);
-
- return {};
}
}
+ return {};
}
for (const ModelNode &node : allModelNodesOfType("QtQuick.Timeline.Timeline")) {
@@ -227,8 +226,9 @@ QmlTimeline CurveEditorView::activeTimeline() const
if (!propertyChanges.isValid())
continue;
- if (node.hasVariantProperty("enabled") && node.variantProperty("enabled").value().toBool())
- return QmlTimeline(node);
+ if (propertyChanges.modelNode().hasProperty("enabled") &&
+ propertyChanges.modelNode().variantProperty("enabled").value().toBool())
+ return QmlTimeline(node);
}
}
return {};