X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_AttributeSelection.cpp;h=b81952bd58d0d1b6188dc675235c27b9a59c054f;hb=e85bb4f7065e5750e48a7c77056c80c0fa18e559;hp=9d9fbb97b93b6f5f9288e12d5b43045cfb19f4fc;hpb=363f70c6b79853f37aea293416c9fa972056754a;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 9d9fbb97b..b81952bd5 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -180,6 +180,17 @@ bool Model_AttributeSelection::setValue(const ObjectPtr& theContext, aSelLab.ForgetAllAttributes(true); TDataStd_UAttribute::Set(aSelLab, kPART_REF_ID); selectPart(std::dynamic_pointer_cast(theContext), theSubShape); + } else { // check the feature context: parent-Part of this feature should not be used + FeaturePtr aFeatureContext = std::dynamic_pointer_cast(theContext); + if (aFeatureContext.get()) { + if (owner()->document() != aFeatureContext->document()) { + aSelLab.ForgetAllAttributes(true); + myRef.setValue(ObjectPtr()); + if (aToUnblock) + owner()->data()->blockSendAttributeUpdated(false); + return false; + } + } } owner()->data()->sendAttributeUpdated(this);