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 <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Miikka Heikkinen
2022-09-30 15:28:33 +03:00
parent 395e40b8f3
commit 243e473b4c

View File

@@ -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 {