{
TDialog* aDlg = new TDialog(theModule);
aDlg->initFromPrsObject(dynamic_cast<TPrs3d*>(theData.myPrs[0]));
- if (aDlg->exec()) {
- for (int i = 0; i < theData.myNbFrames; i++)
- aDlg->storeToPrsObject(dynamic_cast<TPrs3d*>(theData.myPrs[i]));
+ if (aDlg->exec() && aDlg->storeToPrsObject(dynamic_cast<TPrs3d*>(theData.myPrs[0]))) {
+ for (int i = 1; i < theData.myNbFrames; i++)
+ theData.myPrs[i]->SameAs(theData.myPrs[0]);
if ( theAnimator->getAnimationMode() == 1 ) {
for (int i = 1; i < theAnimator->getNbFields(); i++) {
for (int j = 0; j < theAnimator->getFieldData(i).myNbFrames; j++)
- aDlg->storeToPrsObject(dynamic_cast<TPrs3d*>(theAnimator->getFieldData(i).myPrs[j]));
+ theAnimator->getFieldData(i).myPrs[j]->SameAs(theData.myPrs[0]);
}
}
}
typedef VISU::ScalarMapOnDeformedShape_i TYPE;
DLG* aDlg = new DLG (myModule);
aDlg->initFromPrsObject(dynamic_cast<TYPE*>(aData.myPrs[0]));
- if (aDlg->exec())
- {
- int anbFrames=aDlg->getCurrentScalarNbIterations();
- int aIter = 0;
- for (int i = 0; i < aData.myNbFrames; i++){
- TYPE* aCurrPrs_i = dynamic_cast<TYPE*>(aData.myPrs[i]);
- aIter = i+1;
- if(i+1 > anbFrames)
- aIter=anbFrames;
- aDlg->storeToPrsObject(aCurrPrs_i);
- }
+ if (aDlg->exec() && aDlg->storeToPrsObject(aData.myPrs[0])) {
+ for (int i = 1; i < aData.myNbFrames; i++){
+ aData.myPrs[i]->SameAs(aData.myPrs[0]);
}
+ }
delete aDlg;
}
break;