]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
authormpv <mpv@opencascade.com>
Wed, 3 Jun 2015 13:07:01 +0000 (16:07 +0300)
committermpv <mpv@opencascade.com>
Wed, 3 Jun 2015 13:07:01 +0000 (16:07 +0300)
src/Model/Model_ResultBody.cpp

index 704de68d88c9e40fbff214d9da762ec72ccd6542..f7492cc9534cfb7d71a92083b6e66dfefe547a3e 100644 (file)
@@ -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<TopoDS_Shape, TopoDS_Shape>
         (anIter.OldShape(), anIter.NewShape()));
     }
   }
-  // remove old
-  theLab.ForgetAttribute(TNaming_NamedShape::GetID());
   // create new
   TNaming_Builder aBuilder(theLab);
   TNaming_Evolution anEvol = (TNaming_Evolution)(anEvolution);