Commit f07e92e3 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: crash fix

We have to check if an AuxiliaryData actually exists.

Reviewed-by: Kai Koehne
parent 89597780
......@@ -271,13 +271,13 @@ void QmlAnchorBindingProxy::resetLayout() {
m_fxItemNode.anchors().removeAnchors();
m_fxItemNode.anchors().removeMargins();
if (qFuzzyCompare(m_fxItemNode.instancePosition().x(), 0.0))
if (qFuzzyCompare(m_fxItemNode.instancePosition().x(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "x"))
m_fxItemNode.setVariantProperty("x", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "x"));
if (qFuzzyCompare(m_fxItemNode.instancePosition().y(), 0.0))
if (qFuzzyCompare(m_fxItemNode.instancePosition().y(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "y"))
m_fxItemNode.setVariantProperty("y", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "y"));
if (qFuzzyCompare(m_fxItemNode.instanceSize().width(), 0.0))
if (qFuzzyCompare(m_fxItemNode.instanceSize().width(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "width"))
m_fxItemNode.setVariantProperty("width", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "width"));
if (qFuzzyCompare(m_fxItemNode.instanceSize().height(), 0.0))
if (qFuzzyCompare(m_fxItemNode.instanceSize().height(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "height"))
m_fxItemNode.setVariantProperty("height", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "height"));
emit topAnchorChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment