const char* theFieldName,
int theTimeId)
{
- VISU::Result_var aResult;
- if (CheckResult(theModule,theTimeStamp,aResult)){
- QApplication::setOverrideCursor(Qt::waitCursor);
- TPrs3d_i* aPrs3d =
- GetVisuGen(theModule)->template CreatePrs3d<TPrs3d_i>
- (aResult,theMeshName,theEntity,theFieldName,theTimeId);
- QApplication::restoreOverrideCursor();
- if(aPrs3d)
+ try{
+ VISU::Result_var aResult;
+ if (CheckResult(theModule,theTimeStamp,aResult)) {
+ QApplication::setOverrideCursor(Qt::waitCursor);
+ TPrs3d_i* aPrs3d =
+ GetVisuGen(theModule)->template CreatePrs3d<TPrs3d_i>
+ (aResult,theMeshName,theEntity,theFieldName,theTimeId);
+ QApplication::restoreOverrideCursor();
return aPrs3d;
+ }
+ SUIT_MessageBox::warn1(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
+ QObject::tr("BUT_OK") );
+ return NULL;
+ }catch(SALOME::SALOME_Exception &S_ex) {
+ QApplication::restoreOverrideCursor();
+ SUIT_MessageBox::warn1(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QString(S_ex.details.text),
+ QObject::tr("BUT_OK") );
+ }catch(...) {
+ QApplication::restoreOverrideCursor();
+ SUIT_MessageBox::warn1(GetDesktop(theModule),
+ QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
+ QObject::tr("BUT_OK") );
}
- SUIT_MessageBox::warn1(GetDesktop(theModule),
- QObject::tr("WRN_VISU"),
- QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
- QObject::tr("BUT_OK") );
return NULL;
}