From 4c9e4e6c3813a65577bfb0201b73806b8e1b6a62 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 3 Sep 2015 14:14:32 +0300 Subject: [PATCH] Make the partition selection of plane correctly named, since it is used in the later naming structures --- src/Model/Model_AttributeSelection.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.39.2