From: mpv Date: Thu, 3 Sep 2015 11:14:32 +0000 (+0300) Subject: Make the partition selection of plane correctly named, since it is used in the later... X-Git-Tag: V_1.4.0_beta4~138 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4c9e4e6c3813a65577bfb0201b73806b8e1b6a62;p=modules%2Fshaper.git Make the partition selection of plane correctly named, since it is used in the later naming structures --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 4fcb26fae..b900b1819 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -135,6 +135,15 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext, // to sub, so the whole result is selected aSelLab.ForgetAllAttributes(true); TDataStd_UAttribute::Set(aSelLab, kCONSTUCTION_SIMPLE_REF_ID); + // 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(theContext->shape()->impl()); + std::shared_ptr aMyDoc = + std::dynamic_pointer_cast(owner()->document()); + std::string aName = theContext->data()->name(); + aMyDoc->addNamingName(aSelLab, aName); + TDataStd_Name::Set(aSelLab, aName.c_str()); } else { selectConstruction(theContext, theSubShape); }