From: mpv Date: Fri, 25 Mar 2016 14:02:32 +0000 (+0300) Subject: Make wires selection on sketch result updated correctly X-Git-Tag: V_2.3.0~323 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2a07cb0965fb2cf178c22df7051b93e70724ee20;p=modules%2Fshaper.git Make wires selection on sketch result updated correctly --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index da94a1206..6462c7b84 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -474,7 +474,7 @@ bool Model_AttributeSelection::update() return setInvalidIfFalse(aSelLab, false); } - if (aShapeType == TopAbs_FACE) { // compound is for the whole sketch selection + if (aShapeType == TopAbs_FACE || aShapeType == TopAbs_WIRE) { // compound is for the whole sketch selection // If this is a wire with plane defined thin it is a sketch-like object if (!aConstructionContext->facesNum()) // no faces, update can not work correctly return setInvalidIfFalse(aSelLab, false); @@ -552,6 +552,13 @@ bool Model_AttributeSelection::update() } } if (aNewSelected) { // store this new selection + if (aShapeType == TopAbs_WIRE) { // just get a wire from face to have wire + TopExp_Explorer aWireExp(aNewSelected->impl(), TopAbs_WIRE); + if (aWireExp.More()) { + aNewSelected.reset(new GeomAPI_Shape); + aNewSelected->setImpl(new TopoDS_Shape(aWireExp.Current())); + } + } selectConstruction(aContext, aNewSelected); owner()->data()->sendAttributeUpdated(this); return setInvalidIfFalse(aSelLab, true);