void QmlAnchorBindingProxy::setRightAnchor(bool anchor) { if (!m_qmlItemNode.hasNodeParent()) return; if (rightAnchored() == anchor) return; RewriterTransaction transaction = beginRewriterTransaction( QByteArrayLiteral("QmlAnchorBindingProxy::setRightAnchor")); if (!anchor) { removeRightAnchor(); } else { setDefaultRelativeRightTarget(); anchorRight(); if (leftAnchored()) backupPropertyAndRemove(modelNode(), "width"); } emit relativeAnchorTargetRightChanged(); emit rightAnchorChanged(); if (hasAnchors() != anchor) emit anchorsChanged(); }
void QmlAnchorBindingProxy::setRightAnchor(bool anchor) { if (!m_qmlItemNode.hasNodeParent()) return; if (rightAnchored() == anchor) return; RewriterTransaction transaction = m_qmlItemNode.modelNode().view()->beginRewriterTransaction(QByteArrayLiteral("QmlAnchorBindingProxy::setRightAnchor")); if (!anchor) { removeRightAnchor(); } else { calcRightMargin(); if (leftAnchored()) backupPropertyAndRemove(modelNode(), "width"); } emit rightAnchorChanged(); if (hasAnchors() != anchor) emit anchorsChanged(); }