anIntoResult->setValue(SKETCH_PROJECTION_INCLUDE_INTO_RESULT);
aProjectionFeature->execute();
+ ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
+ bool isValid = aValidators->validate(aProjectionFeature);
+
// if projection feature has not been created, exit
AttributeRefAttrPtr aRefAttr = aProjectionFeature->data()->refattr(
SketchPlugin_Projection::PROJECTED_FEATURE_ID());
- if (!aRefAttr || !aRefAttr->isInitialized())
+ if (!isValid || !aRefAttr || !aRefAttr->isInitialized())
{
// remove external feature if the attribute is not filled
std::set<FeaturePtr> aFeatures;
if (!theComposite.get())
return;
- static Events_Loop* aLoop = Events_Loop::loop();
int aNumberOfSubs = theComposite->numberOfSubs();
for (int i = 0; i < aNumberOfSubs; i++) {
FeaturePtr aSubFeature = theComposite->subFeature(i);