From: mpv Date: Mon, 25 Jan 2016 11:12:47 +0000 (+0300) Subject: Fix for the issue #1202 : update the shape of the referenced plane X-Git-Tag: V_2.2.0~177 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=46a35c319e62aeb3832b24769278aa33e8246861;p=modules%2Fshaper.git Fix for the issue #1202 : update the shape of the referenced plane --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 5a211a752..3ba9a1c50 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -416,6 +416,16 @@ bool Model_AttributeSelection::update() std::shared_ptr aShape(new GeomAPI_Shape); aShape->setImpl(new TopoDS_Shape(aComp)); selectConstruction(aContext, aShape); + } else { + // For correct naming selection, put the shape into the naming structure. + // It seems sub-shapes are not needed: only this shape is (and can be ) selected. + TNaming_Builder aBuilder(aSelLab); + aBuilder.Generated(aContext->shape()->impl()); + std::shared_ptr aMyDoc = + std::dynamic_pointer_cast(owner()->document()); + std::string aName = aContext->data()->name(); + aMyDoc->addNamingName(aSelLab, aName); + TDataStd_Name::Set(aSelLab, aName.c_str()); } return setInvalidIfFalse(aSelLab, aContext->shape() && !aContext->shape()->isNull()); }