Commit 70fd2c21 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.NodeInstances: crash fix

This patch avoids a recursion.

Reviewed-by: Marco Bubke
parent 742d9008
......@@ -247,16 +247,22 @@ QVariant QmlGraphicsItemNodeInstance::property(const QString &name) const
double implicitWidth = qmlGraphicsItem()->implicitWidth();
if (!m_hasWidth
&& implicitWidth // WORKAROUND
&& implicitWidth != qmlGraphicsItem()->width())
qmlGraphicsItem()->setWidth(implicitWidth);
&& implicitWidth != qmlGraphicsItem()->width()) {
qmlGraphicsItem()->blockSignals(true);
qmlGraphicsItem()->setWidth(implicitWidth);
qmlGraphicsItem()->blockSignals(false);
}
}
if (name == "height" && modelNode().isValid() && !modelNode().hasBindingProperty("height")) {
double implicitHeight = qmlGraphicsItem()->implicitHeight();
if (!m_hasHeight
&& implicitHeight // WORKAROUND
&& implicitHeight != qmlGraphicsItem()->height())
qmlGraphicsItem()->setHeight(implicitHeight);
&& implicitHeight != qmlGraphicsItem()->height()) {
qmlGraphicsItem()->blockSignals(true);
qmlGraphicsItem()->setHeight(implicitHeight);
qmlGraphicsItem()->blockSignals(false);
}
}
return GraphicsObjectNodeInstance::property(name);
......
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