forked from qt-creator/qt-creator
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user