#include <HYDROData_CalculationCase.h>
#include <GeometryGUI.h>
+#include <GEOMBase.h>
#include <SalomeApp_Study.h>
HYDROGUI_Tool::GetSelectedObject( module() ) );
if ( aCalculation.IsNull() ) {
- theErrorMsg = tr( "EXPORT_FAILED" );
+ theErrorMsg = tr( "NULL_DATA_OBJECT" );
return false;
}
+ QString anErrorMsg;
bool anIsOk = false;
TopoDS_Shell aShell = aCalculation->GetShell();
// Puplish the GEOM object
if ( !aGeomObj->_is_nil() ) {
- QString aName = tr( "OBJ_PREFIX" ) + aCalculation->GetName();
+ QString aName = GEOMBase::GetDefaultName( tr( "OBJ_PREFIX" ) + aCalculation->GetName() );
SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
SALOMEDS::SObject_var aResultSO =
anIsOk = true;
}
}
+
+ if ( !anIsOk )
+ theErrorMsg = tr( "IMPOSSIBLE_TO_CREATE_GEOM_SHAPE" );
+
} else {
theErrorMsg = tr( "RESULT_SHAPE_NULL" );
}
- if ( !anIsOk && theErrorMsg.isEmpty() ) {
- theErrorMsg = tr( "EXPORT_FAILED" );
- }
-
return anIsOk;
}
}
else {
abort();
- QString aMsg = tr( "INPUT_VALID_DATA" );
- if( !anErrorMsg.isEmpty() )
- aMsg.prepend( anErrorMsg + "\n" );
+
+ if ( anErrorMsg.isEmpty() )
+ anErrorMsg = tr( "EXPORT_DATA_FAILED" );
+
+ anErrorMsg.prepend( tr( "EXPORT_FAILED" ) + "\n" );
+
SUIT_MessageBox::critical( module()->getApp()->desktop(),
tr( "EXPORT_STATUS" ),
- aMsg );
+ anErrorMsg );
}
}
\ No newline at end of file