if (aData.myPrs.empty())
myAnimator->generatePresentations(myFieldLst->currentItem());
+ if(!aData.myNbFrames || !aData.myPrs[0]){
+ QApplication::restoreOverrideCursor();
+ SUIT_MessageBox::warn1(this,
+ tr("ERROR"),
+ VisuGUI_TimeAnimationDlg::tr("MSG_NO_ANIMATIONDATA"),
+ tr("&OK"));
+ return;
+ }
+
int aType = myComboId2TypeId[myTypeCombo->currentItem()];
switch (aType) {
case TSCALARMAP_ITEM: //Scalar Map
#include "SALOMEDSClient_AttributeComment.hxx"
#include "SALOMEDSClient_AttributeName.hxx"
+#include "CASCatch.hxx"
#include <qpixmap.h>
#include <qimage.h>
QString aFieldName = VISU::Storable::FindValue(aTimeMap,"myFieldName");
int aTimeStampId = VISU::Storable::FindValue(aTimeMap,"myTimeStampId").toInt();
+ bool anIsCreated = false;
TPrs3d* aPresent = new TPrs3d(theResult, false);
- aPresent->Create(aMeshName.latin1(), anEntity,
- aFieldName.latin1(), aTimeStampId);
- theData.myPrs[aFrameId++] = aPresent;
-
- aMin = std::min(aPresent->GetMin(), aMin);
- aMax = std::max(aPresent->GetMax(), aMax);
+ CASCatch_TRY{
+ try{
+ if(aPresent->Create(aMeshName.latin1(),anEntity,aFieldName.latin1(),aTimeStampId)){
+ anIsCreated = true;
+ theData.myPrs[aFrameId++] = aPresent;
+ aMin = std::min(aPresent->GetMin(), aMin);
+ aMax = std::max(aPresent->GetMax(), aMax);
+ }
+ }catch(std::exception& exc){
+ INFOS("Follow exception was occured :\n"<<exc.what());
+ }catch(...){
+ INFOS("Unknown exception was occured!");
+ }
+ }CASCatch_CATCH(Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ INFOS("Follow signal was occured :\n"<<aFail->GetMessageString());
+ }
+ if(!anIsCreated)
+ aPresent->_remove_ref();
}
theData.myNbFrames = aFrameId;