diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp
index fb032baa528c41826bb3a009d723e5778a11b915..772ff7f7e2f0ea1908ccf7cf10965a0067945fe4 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp
@@ -514,10 +514,10 @@ void QmlAnchorBindingProxy::fill()
     setHorizontalCentered(false);
     setVerticalCentered(false);
 
-    m_fxItemNode.anchors().setMargin(AnchorLine::Right, 0);
-    m_fxItemNode.anchors().setMargin(AnchorLine::Left, 0);
-    m_fxItemNode.anchors().setMargin(AnchorLine::Top, 0);
-    m_fxItemNode.anchors().setMargin(AnchorLine::Bottom, 0);
+    m_fxItemNode.anchors().removeMargin(AnchorLine::Right);
+    m_fxItemNode.anchors().removeMargin(AnchorLine::Left);
+    m_fxItemNode.anchors().removeMargin(AnchorLine::Top);
+    m_fxItemNode.anchors().removeMargin(AnchorLine::Bottom);
 
     emit topAnchorChanged();
     emit bottomAnchorChanged();