X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeReference.cpp;h=a5540e7415845b1791a2860e8b40cfe6a8d30527;hb=919e6d70d8e318b7451524cc658a2185fd7d2bb8;hp=e2ff01ce7798975aa6e11d829c86281f6bfc99f5;hpb=8ef37902d880bc2e74f2ae46880aaee1b4c19307;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeReference.cpp b/src/Model/Model_AttributeReference.cpp index e2ff01ce7..a5540e741 100644 --- a/src/Model/Model_AttributeReference.cpp +++ b/src/Model/Model_AttributeReference.cpp @@ -10,15 +10,15 @@ using namespace std; -void Model_AttributeReference::setValue(FeaturePtr theFeature) +void Model_AttributeReference::setValue(ObjectPtr theObject) { - if (!myIsInitialized || value() != theFeature) { + if (!myIsInitialized || value() != theObject) { boost::shared_ptr aData = - boost::dynamic_pointer_cast(theFeature->data()); + boost::dynamic_pointer_cast(theObject->data()); if (myRef.IsNull()) { boost::shared_ptr aMyData = boost::dynamic_pointer_cast(owner()->data()); - myRef = TDF_Reference::Set(aMyData->label(), aData->label()); + myRef = TDF_Reference::Set(aMyData->label(), aData->label().Father()); } else { myRef->Set(aData->label()); } @@ -26,14 +26,14 @@ void Model_AttributeReference::setValue(FeaturePtr theFeature) } } -FeaturePtr Model_AttributeReference::value() +ObjectPtr Model_AttributeReference::value() { if (!myRef.IsNull()) { boost::shared_ptr aDoc = boost::dynamic_pointer_cast(owner()->document()); if (aDoc) { TDF_Label aRefLab = myRef->Get(); - return aDoc->feature(aRefLab); + return aDoc->object(aRefLab); } } // not initialized