QmlDesigner: Fix clearing node lock/eyeball

Lock/eyeball status was not propagated to puppet when lock/eyeball
was cleared, as clearing these aux properties instead removes them,
which triggers change notification with invalid value. Fixed by
allowing invalid value to be propagated for these properties.

Fixes: QDS-8735
Change-Id: Ic5c4818afeef71612f9620b3a0af503793a37e90
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-01-09 13:49:41 +02:00
parent fb14965dfe
commit df3ace009a

View File

@@ -640,14 +640,12 @@ void NodeInstanceView::auxiliaryDataChanged(const ModelNode &node,
case AuxiliaryDataType::Document: case AuxiliaryDataType::Document:
if ((key == lockedProperty || key == invisibleProperty) && hasInstanceForModelNode(node)) { if ((key == lockedProperty || key == invisibleProperty) && hasInstanceForModelNode(node)) {
NodeInstance instance = instanceForModelNode(node); NodeInstance instance = instanceForModelNode(node);
if (value.isValid()) { PropertyValueContainer container{instance.instanceId(),
PropertyValueContainer container{instance.instanceId(), PropertyName{key.name},
PropertyName{key.name}, value,
value, TypeName(),
TypeName(), key.type};
key.type}; m_nodeInstanceServer->changeAuxiliaryValues({{container}});
m_nodeInstanceServer->changeAuxiliaryValues({{container}});
}
}; };
break; break;