X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Tools.cpp;h=169ea993dd0f519ebb6e2172b9cb0134765eccc1;hb=380f01e1fce1a012267d604a1190d04bf4659447;hp=4934187cd2886af1b3fcfddf0ac77ea429a75006;hpb=46c0759fa291dad10b713cf02b341d6e9e60c1a4;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 4934187cd..169ea993d 100644 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -384,10 +384,13 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal( 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 aFeatures; @@ -733,7 +736,6 @@ void PartSet_Tools::sendSubFeaturesEvent(const CompositeFeaturePtr& theComposite 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);