#include "Model_AttributeDocRef.h"
#include "Model_Application.h"
+#include "Model_Events.h"
+#include <Events_Loop.h>
using namespace std;
void Model_AttributeDocRef::setValue(boost::shared_ptr<ModelAPI_Document> theDoc)
{
- myComment->Set(TCollection_ExtendedString(theDoc->id().c_str()));
+ TCollection_ExtendedString aNewID(theDoc->id().c_str());
+ if (myComment->Get() != aNewID) {
+ myComment->Set(TCollection_ExtendedString(theDoc->id().c_str()));
+
+ static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
+ Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Events_Loop::loop()->send(aMsg);
+ }
}
boost::shared_ptr<ModelAPI_Document> Model_AttributeDocRef::value()