From 243e473b4ccc8686910e30e13a3b89ada2815e86 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 30 Sep 2022 15:28:33 +0300 Subject: [PATCH] QmlDesigner: Fix timeline check when committing dynamic property value Timeline has to be recording for us to care about it at value commit. Otherwise, if there is timeline but it's not recording, we end up with soft assert and losing the dynamic typename, which causes isDynamic checks to fail later on that property. Change-Id: Ib63467ecc4fca1d14409d3c68bb3a5fcd13c10ce Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot --- .../components/propertyeditor/dynamicpropertiesproxymodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp b/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp index b5791ba2870..2c0772a5e1a 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/dynamicpropertiesproxymodel.cpp @@ -335,7 +335,8 @@ void DynamicPropertyRow::commitValue(const QVariant &value) QByteArrayLiteral("DynamicPropertiesModel::commitValue")); try { QmlObjectNode objectNode = variantProperty.parentQmlObjectNode(); - if (view->currentState().isBaseState() && !objectNode.timelineIsActive()) { + if (view->currentState().isBaseState() + && !(objectNode.timelineIsActive() && objectNode.currentTimeline().isRecording())) { if (variantProperty.value() != value) variantProperty.setDynamicTypeNameAndValue(variantProperty.dynamicTypeName(), value); } else {