From: mpv Date: Mon, 20 Aug 2018 06:22:27 +0000 (+0300) Subject: Make extrusions features correctly eat as a base a whole sketch feature selection. X-Git-Tag: SHAPER_V9_1_0RC1~63 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=363f70c6b79853f37aea293416c9fa972056754a;p=modules%2Fshaper.git Make extrusions features correctly eat as a base a whole sketch feature selection. --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 847380c44..9d9fbb97b 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -353,20 +353,22 @@ std::shared_ptr Model_AttributeSelection::internalValue(CenterTyp if (aConstr->isInfinite()) return aResult; // empty result } - // whole feature - FeaturePtr aFeature = contextFeature(); - if (aFeature.get()) { - std::list allShapes; - std::list::const_iterator aRes = aFeature->results().cbegin(); - for (; aRes != aFeature->results().cend(); aRes++) { - if (aRes->get() && !(*aRes)->isDisabled()) { - GeomShapePtr aShape = (*aRes)->shape(); - if (aShape.get() && !aShape->isNull()) { - allShapes.push_back(aShape); + if (!aConstr.get()) { // for construction context, return empty result as usual even + // the whole feature is selected + FeaturePtr aFeature = contextFeature(); + if (aFeature.get()) { + std::list allShapes; + std::list::const_iterator aRes = aFeature->results().cbegin(); + for (; aRes != aFeature->results().cend(); aRes++) { + if (aRes->get() && !(*aRes)->isDisabled()) { + GeomShapePtr aShape = (*aRes)->shape(); + if (aShape.get() && !aShape->isNull()) { + allShapes.push_back(aShape); + } } } + return GeomAlgoAPI_CompoundBuilder::compound(allShapes); } - return GeomAlgoAPI_CompoundBuilder::compound(allShapes); } Handle(TNaming_NamedShape) aSelection;