]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for bug Bug IPAL14105:
authorenk <enk@opencascade.com>
Mon, 25 Dec 2006 08:39:02 +0000 (08:39 +0000)
committerenk <enk@opencascade.com>
Mon, 25 Dec 2006 08:39:02 +0000 (08:39 +0000)
"PRSMERGER" type of presentation is stored under "Animation", instead of "SCALARMAP".

src/VISU_I/VISU_TimeAnimation.cxx

index d2fb6d84fbba55c639f3309bf888735e1820fa68..a478f55ee7d9ba4e2728d44e7df3928549fc349b 100644 (file)
@@ -1499,7 +1499,7 @@ SALOMEDS::SObject_ptr VISU_TimeAnimation::publishInStudy()
 
   for (int i = 0; i < getNbFields(); i++) {
     FieldData& aData = myFieldsLst[i];
-    if ( aData.myPrs[0] ) {
+    if ( aData.myPrs.front() ) {
       _PTR(SObject) newObj = aStudyBuilder->NewObject(aAnimSObject);
       aStudyBuilder->Addreference(newObj, aData.myField);
       
@@ -1558,7 +1558,8 @@ void VISU_TimeAnimation::saveAnimation()
     aData.myPrs[0]->ToStream(strOut);
     string aPrsComment = strOut.str();
     string aPrsNameTxt = aData.myPrs[0]->GetComment();
-
+    if(aPrsNameTxt == "PRSMERGER")
+      aPrsNameTxt = "SCALARMAP";
     // Save in study
     _PTR(SObject) aRefObj = anIter->Value();
     _PTR(ChildIterator) anPrsIter = myStudy->NewChildIterator(aRefObj);