true,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
myAnimator(theAnimator),
- myModule(theModule)
+ myModule(theModule),
+ myIsRegenerate( false )
{
setCaption("Setup Animation");
setSizeGripEnabled( TRUE );
//------------------------------------------------------------------------
void SetupDlg::onClose()
{
- //for (int i = 0; i < myAnimator->getNbFields(); i++)
- // myAnimator->clearData(myAnimator->getFieldData(i));
-
if( !myUseRangeBox->isChecked() )
myAnimator->setAnimationRange( 0, 0 );
myAnimator->setAnimationRange(0, 0);
else
myAnimator->setAnimationRange(myMinVal->value(), myMaxVal->value());
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
return;
}
myAnimator->setAnimationRange(theVal, myAnimator->getMaxRange());
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
return;
}
myAnimator->setAnimationRange(myAnimator->getMinRange(), theVal);
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
myUseRangeBox->setChecked( false );
myUseRangeBox->blockSignals( false );
}
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
myIndices->setPaletteForegroundColor( Qt::black );
myAnimator->setAnimationSequence( theIndices.latin1() );
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
myIndices->blockSignals( false );
myAnimator->setAnimationSequence( anIndices.latin1() );
+
+ setIsRegenerate( true );
}
//------------------------------------------------------------------------
SUIT_OverrideCursor c;
for (int i = 0; i < myAnimator->getNbFields(); i++) {
- if (myAnimator->getFieldData(i).myPrs.empty())
- myAnimator->generatePresentations(i);
- }
- /*
- for (int aFieldId = 0; aFieldId < myAnimator->getNbFields(); aFieldId++) {
- FieldData& aFieldData = myAnimator->getFieldData(aFieldId);
+ FieldData& aFieldData = myAnimator->getFieldData(i);
if( aFieldData.myPrs.empty() )
+ {
+ myAnimator->generatePresentations(i);
continue;
+ }
+
+ // ouv : IPAL18064
+ // even if aFieldData is not empty, we must regenerate presentations,
+ // when a range or a sequence of the animation has been changed
+ if( mySetupDlg->isRegenerate() )
+ {
+ VISU::ColoredPrs3d_i* aPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(aFieldData.myPrs[0]);
+ if( !aPrs3d )
+ continue;
- VISU::ColoredPrs3d_i* aPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(aFieldData.myPrs[0]);
- for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
- VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId];
- aColoredPrs3d->SameAs(aPrs3d);
- if ( aFrameId != 0 && myAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) {
- std::string aTitle = aColoredPrs3d->GetCTitle();
- aColoredPrs3d->SetTitle(aTitle.c_str());
+ myAnimator->generatePresentations(i);
+
+ aFieldData = myAnimator->getFieldData(i);
+ for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
+ VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId];
+ aColoredPrs3d->SameAs(aPrs3d);
+ if ( aFrameId != 0 && myAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) {
+ std::string aTitle = aColoredPrs3d->GetCTitle();
+ aColoredPrs3d->SetTitle(aTitle.c_str());
+ }
}
+ mySetupDlg->setIsRegenerate( false );
}
}
- */
+
if (myAnimator->getNbFrames() == 0) {
myPlayFrame->setEnabled(false);
c.suspend();