From 66100a64ea041c1332b67c7207fb665d7711b6a9 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 20 May 2008 07:20:13 +0000 Subject: [PATCH] NPAL18240: EDF628: include the number of the instant into the name of saved pictures during animation. --- src/VISU_I/VISU_TimeAnimation.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index 6d82f267..b73b1683 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -1353,11 +1353,17 @@ void VISU_TimeAnimation::saveImages( int theFieldId, if (myDumpFormat.compare("AVI") != 0) { QString aFile(myDumpPath); + int aFrameNb = myFrame; // parallel animation mode + if ( myAnimationMode == VISU::Animation::SUCCESSIVE ) // successive animation mode + aFrameNb = getRelativeFrameNumber(myFrame).second; + + int aMaxNb = myFieldsLst[theFieldId].myTiming.size(); + int nbDigits = QString("%1").arg(aMaxNb).length(); + QString aFormat = QString("%.%1d_").arg(nbDigits); + QString aName; - if ( myAnimationMode == VISU::Animation::PARALLEL ) // parallel animation mode - aName = QString("%1").arg(myFieldsLst[theFieldId].myTiming[myFrame]); - else // successive animation mode - aName = QString("%1").arg(myFieldsLst[theFieldId].myTiming[getRelativeFrameNumber(myFrame).second]); + aName.sprintf(aFormat.latin1(), aFrameNb); + aName += QString("%1").arg(myFieldsLst[theFieldId].myTiming[aFrameNb]); int aPos = -1; while ((aPos = aName.find(".")) > -1 ) -- 2.39.2