QmlDesigner: Update child nodes in navigator when lock state changes

Child nodes of a locked node should also appear locked, so they need
to be updated whenever locked state changes on a ancestor node.

Fixes: QDS-8732
Change-Id: I5675e129fb60c5ad8c0fdbc7e0a0a7fef410747a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-01-09 15:54:15 +02:00
parent 20cbf4d34b
commit f673d3d0b0

View File

@@ -403,6 +403,13 @@ void NavigatorView::auxiliaryDataChanged(const ModelNode &modelNode,
[[maybe_unused]] const QVariant &data)
{
m_currentModelInterface->notifyDataChanged(modelNode);
if (key == lockedProperty) {
// Also notify data changed on child nodes to redraw them
const QList<ModelNode> childNodes = modelNode.allSubModelNodes();
for (const auto &childNode : childNodes)
m_currentModelInterface->notifyDataChanged(childNode);
}
}
void NavigatorView::instanceErrorChanged(const QVector<ModelNode> &errorNodeList)