X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_Data.cpp;h=1bd4dc1b96c3e861f0936e9d65badc93f4886fee;hb=ecec337d46d54cb79cbca6233fb93449513603af;hp=5dcc138deeecbf1d46821c83b5e93fe7173cd6ce;hpb=3c3d2b36e230e15ee8384554118ea13ca1415772;p=modules%2Fshaper.git diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 5dcc138de..1bd4dc1b9 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Model_Data.hxx // Created: 21 Mar 2014 // Author: Mikhail PONIKAROV @@ -100,6 +102,7 @@ void Model_Data::addAttribute(const std::string& theID, const std::string theAtt if (anAttr) { myAttrs[theID] = std::shared_ptr(anAttr); anAttr->setObject(myObject); + anAttr->setID(theID); } else { Events_Error::send("Can not create unknown type of attribute " + theAttrType); } @@ -195,7 +198,7 @@ void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr) static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED); ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent); if (myObject) { - myObject->attributeChanged(); + myObject->attributeChanged(theAttr->id()); } } } @@ -264,7 +267,6 @@ void Model_Data::referencesToObjects( std::shared_ptr aRef = std::dynamic_pointer_cast< ModelAPI_AttributeReference>(anAttr->second); aReferenced.push_back(aRef->value()); - theRefs.push_back(std::pair >(anAttr->first, aReferenced)); } else if (aType == ModelAPI_AttributeRefAttr::type()) { // reference to attribute or object std::shared_ptr aRef = std::dynamic_pointer_cast< ModelAPI_AttributeRefAttr>(anAttr->second);