From: apo Date: Sun, 25 Nov 2007 09:53:28 +0000 (+0000) Subject: Fix for Bug IPAL17296 X-Git-Tag: mergefrom_MERGE_MULTIPR_EVOLUTION_07-Dec-07~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5a93e84f13265589d1d795ad95a148336d46f45;p=modules%2Fvisu.git Fix for Bug IPAL17296 4.x: To correct "visu_apply_properties_successive.py" and "visu_succcessive_animation.py" --- diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index 1f4d2e76..1435e8f8 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -491,7 +491,7 @@ SetupDlg::SetupDlg (QWidget* theParent, double aStep; if ( myAnimator->getAnimationMode() == VISU::Animation::PARALLEL ) aStep = (aMaxTime - aMinTime) / (myAnimator->getFieldData(0).myNbTimes - 1); - else { // succcessive animation mode + else { // successive animation mode std::pair aLastFieldFrame(myAnimator->getNbFields() - 1, myAnimator->getFieldData(myAnimator->getNbFields() - 1).myNbTimes - 1); aStep = (aMaxTime - aMinTime) / myAnimator->getAbsoluteFrameNumber(aLastFieldFrame); @@ -724,7 +724,7 @@ void SetupDlg::onFieldChange (int theIndex) aPrsType = aData.myPrsType; } - else if ( myAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) { // succcessive animation mode + else if ( myAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) { // successive animation mode for (int i = 0; i < myAnimator->getNbFields(); i++) { _PTR(SObject) aSO = myAnimator->getFieldData(i).myField; diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index d798ef3e..70946d1d 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -262,7 +262,7 @@ bool VISU_TimeAnimation::addField (_PTR(SObject) theField) if ( myFieldsLst.isEmpty() ) myFieldsAbsFrames.push_back(aNewData.myNbTimes); } - else { // succcessive animation mode + else { // successive animation mode if ( aNewData.myNbTimes < 1 ) return false; @@ -458,7 +458,7 @@ namespace double getMinFieldsValue( QValueList& theFieldsLst ) { - // for succcessive animation mode only + // for successive animation mode only double aRes; for (int i = 0; i < theFieldsLst.count(); i++) { if ( theFieldsLst[i].myPrs[0] ) { @@ -476,7 +476,7 @@ double getMinFieldsValue( QValueList& theFieldsLst ) double getMaxFieldsValue( QValueList& theFieldsLst ) { - // for succcessive animation mode only + // for successive animation mode only double aRes; for (int i = 0; i < theFieldsLst.count(); i++) { if ( theFieldsLst[i].myPrs[0] ) { @@ -813,7 +813,7 @@ void VISU_TimeAnimation::_nextFrame() { if (myFieldsLst[i].myActors[myFrame] != 0) visibilityOff(i, myFrame); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -831,7 +831,7 @@ void VISU_TimeAnimation::_nextFrame() { ProcessVoidEvent(new TVoidMemFun2ArgEvent(this, &VISU_TimeAnimation::_emitFrameChanged, myFrame, myFieldsLst[0].myTiming[myFrame])); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -870,7 +870,7 @@ void VISU_TimeAnimation::_prevFrame() { if (myFieldsLst[i].myActors[myFrame] != 0) visibilityOff(i, myFrame); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -888,7 +888,7 @@ void VISU_TimeAnimation::_prevFrame() { ProcessVoidEvent(new TVoidMemFun2ArgEvent(this, &VISU_TimeAnimation::_emitFrameChanged, myFrame, myFieldsLst[0].myTiming[myFrame])); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -923,7 +923,7 @@ void VISU_TimeAnimation::_firstFrame() { if (myFieldsLst[i].myActors[myFrame] != 0) visibilityOff(i, myFrame); } - else { //succcessive animation mode + else { //successive animation mode std::pair aPair = getRelativeFrameNumber(myFrame); int aFieldId = aPair.first; long aFrameId = aPair.second; @@ -936,7 +936,7 @@ void VISU_TimeAnimation::_firstFrame() { int imax; if ( myAnimationMode == VISU::Animation::PARALLEL ) // parallel animation mode imax = getNbFields(); - else //succcessive animation mode + else //successive animation mode imax = 1; for (i = 0; i < imax; i++) @@ -975,7 +975,7 @@ void VISU_TimeAnimation::_lastFrame() { if (myFieldsLst[i].myActors[myFrame] != 0) visibilityOff(i, myFrame); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -993,7 +993,7 @@ void VISU_TimeAnimation::_lastFrame() { ProcessVoidEvent(new TVoidMemFun2ArgEvent(this, &VISU_TimeAnimation::_emitFrameChanged, myFrame, myFieldsLst[0].myTiming[myFrame])); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -1035,7 +1035,7 @@ void VISU_TimeAnimation::_gotoFrame(CORBA::Long theFrame) { if (myFieldsLst[i].myActors[myFrame] != 0) visibilityOff(i, myFrame); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -1053,7 +1053,7 @@ void VISU_TimeAnimation::_gotoFrame(CORBA::Long theFrame) { ProcessVoidEvent(new TVoidMemFun2ArgEvent(this, &VISU_TimeAnimation::_emitFrameChanged, myFrame, myFieldsLst[0].myTiming[myFrame])); } - else { //succcessive animation mode + else { //successive animation mode aPair = getRelativeFrameNumber(myFrame); aFieldId = aPair.first; aFrameId = aPair.second; @@ -1100,7 +1100,7 @@ VISU::ColoredPrs3d_ptr VISU_TimeAnimation::getPresentation(CORBA::Long theField, CORBA::Long VISU_TimeAnimation::getNbFrames() { if ( myAnimationMode == VISU::Animation::PARALLEL ) // parallel animation mode return (getNbFields() > 0)? myFieldsLst[0].myNbFrames : 0; - else //succcessive animation mode + else //successive animation mode return (getNbFields() > 0 && !myFieldsAbsFrames.empty()) ? myFieldsAbsFrames[myFieldsAbsFrames.size()-1] : 0; } @@ -1115,7 +1115,7 @@ long VISU_TimeAnimation::getAbsoluteFrameNumber(std::pair theFieldTime if ( aFrameNum <= myFieldsAbsFrames[0] ) aRes = aFrameNum; } - else { //succcessive animation mode + else { //successive animation mode if ( aFieldId == 0 && aFrameNum <= myFieldsAbsFrames[aFieldId] ) aRes = aFrameNum; else if ( aFieldId && aFrameNum <= myFieldsAbsFrames[aFieldId] - myFieldsAbsFrames[aFieldId-1] ) @@ -1135,7 +1135,7 @@ std::pair VISU_TimeAnimation::getRelativeFrameNumber(long theFrame) aRes.first = 0; aRes.second = theFrame - 1; } - else { //succcessive animation mode + else { //successive animation mode for (int i = 0, iEnd = myFieldsAbsFrames.size(); i < iEnd; i++) if ( myFieldsAbsFrames[i] >= theFrame ) { aRes.first = i; @@ -1242,7 +1242,7 @@ void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList& } //------------------------------------------------------------------------ -void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList& theIndexList ) +void VISU_TimeAnimation::successiveAnimation( bool& theIsDumping, QValueList& theIndexList ) { if (myFrame >= getNbFrames() - 1) { @@ -1433,8 +1433,8 @@ void VISU_TimeAnimation::run() if ( myAnimationMode == VISU::Animation::PARALLEL ) // parallel animation mode parallelAnimation( isDumping, anIndexList ); - else //succcessive animation mode - succcessiveAnimation( isDumping, anIndexList ); + else //successive animation mode + successiveAnimation( isDumping, anIndexList ); // make AVI file if need if (isDumping && myDumpFormat.compare("AVI") == 0 && myExecutionState->IsActive()) { diff --git a/src/VISU_I/VISU_TimeAnimation.h b/src/VISU_I/VISU_TimeAnimation.h index 04cacfc1..85a0b415 100644 --- a/src/VISU_I/VISU_TimeAnimation.h +++ b/src/VISU_I/VISU_TimeAnimation.h @@ -75,7 +75,7 @@ class VISU_I_EXPORT VISU_TimeAnimation: public QObject, public QThread void _emitStopped(); void parallelAnimation( bool& theIsDumping, QValueList& theIndexList ); - void succcessiveAnimation( bool& theIsDumping, QValueList& theIndexList ); + void successiveAnimation( bool& theIsDumping, QValueList& theIndexList ); void saveImages( int theFieldId, double& theOneVal, int& theNbFiles, QValueList& theIndexList ); public: