From b19319ac08d666059966c0a6b3948c7fc4417f9e Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 28 Apr 2016 13:09:16 +0300 Subject: [PATCH] Exclude attribute "Auxiliary" from the Projection feature (issue #1459) --- src/SketchPlugin/SketchPlugin_Projection.cpp | 12 ++---------- src/SketchPlugin/plugin-Sketch.xml | 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_Projection.cpp b/src/SketchPlugin/SketchPlugin_Projection.cpp index 6240c933b..ac7586626 100644 --- a/src/SketchPlugin/SketchPlugin_Projection.cpp +++ b/src/SketchPlugin/SketchPlugin_Projection.cpp @@ -45,6 +45,8 @@ void SketchPlugin_Projection::initDerivedClassAttributes() data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID()); + + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID()); } void SketchPlugin_Projection::execute() @@ -76,16 +78,6 @@ void SketchPlugin_Projection::attributeChanged(const std::string& theID) computeProjection(theID); myIsComputing = false; } - else if (theID == AUXILIARY_ID()) - { - AttributeRefAttrPtr aRefAttr = data()->refattr(PROJECTED_FEATURE_ID()); - if (!aRefAttr || !aRefAttr->isInitialized()) - return; - FeaturePtr aProjection = ModelAPI_Feature::feature(aRefAttr->object()); - if (!aProjection) - return; - aProjection->boolean(AUXILIARY_ID())->setValue(boolean(AUXILIARY_ID())->value()); - } } void SketchPlugin_Projection::computeProjection(const std::string& theID) diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index dab490931..96b230b55 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -125,7 +125,6 @@ - @@ -143,7 +142,6 @@ use_sketch_plane="false"> - -- 2.39.2