#include <ModelAPI_Data.h>
#include <ModelAPI_Document.h>
+#include <Model_Events.h>
+
+#include <Events_Loop.h>
+
#include <SketchPlugin_Line.h>
#include <V3d_View.hxx>
moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_END);
}
}
+ sendFeatures();
+
myCurPoint.setPoint(aPoint);
}
return boost::shared_ptr<ModelAPI_Feature>();
}
-void PartSet_OperationEditLine::moveLinePoint(boost::shared_ptr<ModelAPI_Feature> theFeature,
+void PartSet_OperationEditLine::moveLinePoint(boost::shared_ptr<ModelAPI_Feature> theFeature,
double theDeltaX, double theDeltaY,
const std::string& theAttribute)
{
aPoint->setValue(aPoint->x() + theDeltaX, aPoint->y() + theDeltaY);
}
+
+void PartSet_OperationEditLine::sendFeatures()
+{
+ std::list<boost::shared_ptr<ModelAPI_Feature> > aFeatures;
+ std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
+ for (; anIt != aLast; anIt++) {
+ boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
+ if (!aFeature || aFeature == feature())
+ continue;
+ }
+
+ static Events_ID aModuleEvent = Events_Loop::eventByName("PartSetEditEvent");
+ Model_FeaturesMovedMessage aMessage;
+ aMessage.setFeatures(aFeatures);
+ Events_Loop::loop()->send(aMessage);
+}
+