QmlDesigner: Fix assert

If in a reaction to auxiliaryDataChanged() we change AuxiliaryData
this could trigger cascades and to avoid this we assert.

The cascades and assert can be avoided by checking AuxiliaryData
before.

Change-Id: Id9dd4198041889113fb0e50fdfd4785fddf89f02
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Thomas Hartmann
2020-02-11 16:54:21 +01:00
parent 0d9b0f8074
commit bf0f2ebea0

View File

@@ -661,6 +661,9 @@ void FormEditorView::toggle3DViewEnabled(bool enabled)
QTC_ASSERT(model(), return);
QTC_ASSERT(rootModelNode().isValid(), return);
if (enabled == rootModelNode().hasAuxiliaryData("3d-view"))
return;
if (enabled)
rootModelNode().setAuxiliaryData("3d-view", true);
else