From ec796329bfc51b58435f71a7adda6d3f708d66e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Mon, 18 Sep 2017 09:25:04 +0200 Subject: [PATCH] Expressions: Prevent backlink creation to same objects. fixes #0003192 --- src/App/PropertyExpressionEngine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index e7773b2e99..281102b9f4 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -137,7 +137,7 @@ void PropertyExpressionEngine::Paste(const Property &from) const ObjectIdentifier & p = *j; DocumentObject* docObj = p.getDocumentObject(); - if (docObj) + if (docObj && (docObj != parent)) docObj->_removeBackLink(parent); ++j; @@ -162,7 +162,7 @@ void PropertyExpressionEngine::Paste(const Property &from) const ObjectIdentifier & p = *j; DocumentObject* docObj = p.getDocumentObject(); - if (docObj) + if (docObj && (docObj != parent)) docObj->_addBackLink(parent); ++j; @@ -420,7 +420,7 @@ void PropertyExpressionEngine::setValue(const ObjectIdentifier & path, boost::sh while (j != deps.end()) { const ObjectIdentifier & p = *j; DocumentObject* docObj = p.getDocumentObject(); - if (docObj) + if (docObj && (docObj != parent)) docObj->_addBackLink(parent); ++j; @@ -446,7 +446,7 @@ void PropertyExpressionEngine::setValue(const ObjectIdentifier & path, boost::sh while (j != deps.end()) { const ObjectIdentifier & p = *j; DocumentObject* docObj = p.getDocumentObject(); - if (docObj) + if (docObj && (docObj != parent)) docObj->_removeBackLink(parent); ++j;