From: mkr Date: Thu, 13 Nov 2008 11:14:15 +0000 (+0000) Subject: Fix for IPAL17675 : TC71: REGR: blinking animation and wrong show. X-Git-Tag: V5_1_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6997d88234df891b8d1124fcb5c8706cfe2a4c74;p=modules%2Fvisu.git Fix for IPAL17675 : TC71: REGR: blinking animation and wrong show. --- diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index 13be9942..2d967097 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -1932,7 +1932,19 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField) if (VISU::ScalarMap_i* aPrs = dynamic_cast(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(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();