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