X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelectionList.cpp;h=ae079d7a1673e8158816beeb0416511202124aae;hb=7dc85ea3929c3543703b2d8e689f8a66c0384272;hp=3b67df9eb0a9063e23a7874fde696432fdaa9857;hpb=a11ca8e50848c291ed13f920168622937ae3b8dc;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 3b67df9eb..ae079d7a1 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -96,7 +96,15 @@ void Model_AttributeSelectionList::clear() mySize->Set(0); TDF_ChildIterator aSubIter(mySize->Label()); for(; aSubIter.More(); aSubIter.Next()) { - aSubIter.Value().ForgetAllAttributes(Standard_True); + TDF_Label aLab = aSubIter.Value(); + std::shared_ptr aNewAttr = + std::shared_ptr(new Model_AttributeSelection(aLab)); + if (owner()) { + aNewAttr->setObject(owner()); + } + REMOVE_BACK_REF(aNewAttr->context()); + + aLab.ForgetAllAttributes(Standard_True); } owner()->data()->sendAttributeUpdated(this); }