// Author: Mikhail PONIKAROV
#include "GeomData_Point2D.h"
+#include "Model_Events.h"
+#include <Events_Loop.h>
using namespace std;
void GeomData_Point2D::setValue(const double theX, const double theY)
{
- myCoords->SetValue(0, theX);
- myCoords->SetValue(1, theY);
+ if (myCoords->Value(0) != theX || myCoords->Value(1) != theY) {
+ myCoords->SetValue(0, theX);
+ myCoords->SetValue(1, theY);
+ static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
+ Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Events_Loop::loop()->send(aMsg);
+ }
}
double GeomData_Point2D::x() const