X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultBody.cpp;h=f7492cc9534cfb7d71a92083b6e66dfefe547a3e;hb=refs%2Ftags%2FV_1.2.1;hp=0a51eaba6123a893a3dbf7a5e69659e25047b191;hpb=61dd73aafa0009379230e9539ed9f844c96627d3;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index 0a51eaba6..f7492cc95 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -40,6 +40,7 @@ Model_ResultBody::Model_ResultBody() { + myIsDisabled = true; // by default it is not initialized and false to be after created setIsConcealed(false); } @@ -65,14 +66,26 @@ static void EvolutionToSelection(TDF_Label theLab, const bool theFlag) { Handle(TNaming_NamedShape) aName; int anEvolution = -1; if (theLab.FindAttribute(TNaming_NamedShape::GetID(), aName)) { - anEvolution = (int)(aName->Evolution()); + TNaming_Evolution aNSEvol = aName->Evolution(); + if ((aNSEvol == TNaming_SELECTED && theFlag) || + (aNSEvol != TNaming_SELECTED && !theFlag)) { // nothing to do, it is already correct + 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);