From: mpv Date: Wed, 3 Jun 2015 13:07:01 +0000 (+0300) Subject: Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for... X-Git-Tag: V_1.2.1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e39226506e4b82f6ae5dcc26e776571801b1555;p=modules%2Fshaper.git Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for correct update of evolution and set new shapes. Othervise the MODIFUNTIL name myStop filed in TNaming_Name loses connection with the OCAF label. --- diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index 704de68d8..f7492cc95 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -72,13 +72,20 @@ static void EvolutionToSelection(TDF_Label theLab, const bool theFlag) { return; } anEvolution = (int)(aNSEvol); + if (!theFlag) { + Handle(TDataStd_Integer) anAttrEvol; + if (theLab.FindAttribute(TDataStd_Integer::GetID(), anAttrEvol)) { + anEvolution = anAttrEvol->Get(); + } + } else { + TDataStd_Integer::Set(theLab, anEvolution); + } + for(TNaming_Iterator anIter(aName); anIter.More(); anIter.Next()) { aShapePairs.push_back(std::pair (anIter.OldShape(), anIter.NewShape())); } } - // remove old - theLab.ForgetAttribute(TNaming_NamedShape::GetID()); // create new TNaming_Builder aBuilder(theLab); TNaming_Evolution anEvol = (TNaming_Evolution)(anEvolution);