Skip to content
Snippets Groups Projects
Commit 30a86cb2 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: remove leftovers if anchoring

x, y, width, height are removed if filling
x is removed if anchoring the left...
y is removed if anchoring the top...
width is removed if anchoring the right...
height is removed if anchoring the bottom...
parent c4a5b2c0
No related branches found
No related tags found
No related merge requests found
......@@ -290,6 +290,7 @@ void QmlAnchorBindingProxy::setBottomAnchor(bool anchor)
removeBottomAnchor();
} else {
calcBottomMargin();
m_fxItemNode.removeVariantProperty("height");
}
emit bottomAnchorChanged();
......@@ -311,6 +312,7 @@ void QmlAnchorBindingProxy::setLeftAnchor(bool anchor)
removeLeftAnchor();
} else {
calcLeftMargin();
m_fxItemNode.removeVariantProperty("width");
}
emit leftAnchorChanged();
if (hasAnchors() != anchor)
......@@ -331,6 +333,7 @@ void QmlAnchorBindingProxy::setRightAnchor(bool anchor)
removeRightAnchor();
} else {
calcRightMargin();
m_fxItemNode.removeVariantProperty("x");
}
emit rightAnchorChanged();
if (hasAnchors() != anchor)
......@@ -441,6 +444,7 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor)
removeTopAnchor();
} else {
calcTopMargin();
m_fxItemNode.removeVariantProperty("y");
}
emit topAnchorChanged();
if (hasAnchors() != anchor)
......@@ -538,6 +542,11 @@ void QmlAnchorBindingProxy::fill()
m_fxItemNode.anchors().removeMargin(AnchorLine::Top);
m_fxItemNode.anchors().removeMargin(AnchorLine::Bottom);
m_fxItemNode.removeVariantProperty("x");
m_fxItemNode.removeVariantProperty("y");
m_fxItemNode.removeVariantProperty("width");
m_fxItemNode.removeVariantProperty("height");
emit topAnchorChanged();
emit bottomAnchorChanged();
emit leftAnchorChanged();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment