From 587931f4b809e68fe6a7d5453589aad3ea1d20ca Mon Sep 17 00:00:00 2001 From: mkr Date: Thu, 13 Nov 2008 11:03:28 +0000 Subject: [PATCH] Fix for IPAL17675 : TC71: REGR: blinking animation and wrong show. --- src/VISUGUI/VisuGUI_TimeAnimation.cxx | 2 +- src/VISU_I/VISU_TimeAnimation.cxx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index 2ea7c526..6e2d8f24 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -672,7 +672,7 @@ SetupDlg::SetupDlg (QWidget* theParent, aUseSequenceLayout->setMargin( 11 ); QLabel* anIndicesLbl = new QLabel("Indices", myUseSequenceBox); - myIndices = new QLineEdit( myUseSequenceBox ); + myIndices = new QLineEdit( "", myUseSequenceBox ); myValues = new QListBox( myUseSequenceBox ); myValues->setSelectionMode( QListBox::Extended ); diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index d377dbf1..3477a60b 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -1551,7 +1551,7 @@ void VISU_TimeAnimation::setAnimationSequence(const char* theSequence) //------------------------------------------------------------------------ char* VISU_TimeAnimation::getAnimationSequence() { - return (char*)mySequence.latin1(); + return (char*)(mySequence.isNull() ? "" : mySequence.latin1()); } //------------------------------------------------------------------------ @@ -1916,7 +1916,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(); -- 2.39.2