]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL17675 : TC71: REGR: blinking animation and wrong show.
authormkr <mkr@opencascade.com>
Thu, 13 Nov 2008 11:14:15 +0000 (11:14 +0000)
committermkr <mkr@opencascade.com>
Thu, 13 Nov 2008 11:14:15 +0000 (11:14 +0000)
src/VISU_I/VISU_TimeAnimation.cxx

index 13be9942f8991d35c64b5bd68c62e34d161e3a58..2d967097806a8408ab3cff0317e3a715bbbea574 100644 (file)
@@ -1932,7 +1932,19 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
        if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
          anIsFixedRange = aPrs->IsRangeFixed();
       }
-      aData.myPrs[i]->SameAs(aData.myPrs[0]);
+      if (aData.myPrsType == VISU::TDEFORMEDSHAPEANDSCALARMAP) {
+       if (VISU::DeformedShapeAndScalarMap_i* aDeformedPrs =
+           dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>(aData.myPrs[i])) {
+         //Set correct time stamp number
+         int aTimeStampNum = aDeformedPrs->GetScalarTimeStampNumber();
+         aDeformedPrs->SameAs(aData.myPrs[0]);
+         aDeformedPrs->SetScalarField(aDeformedPrs->GetScalarEntity(),
+                                      aDeformedPrs->GetScalarFieldName(),
+                                      aTimeStampNum);
+       }
+      }
+      else
+       aData.myPrs[i]->SameAs(aData.myPrs[0]);
     }
   }
   string aStr = aAnimSObject->GetID();