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