Salome HOME
Merge branch 'BR_HYDRO_IMPS_2016' into pre/IMPS_2016
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.cxx
index d0949778ad6e792cd8d126b9b19e588c1f109d21..ebfd1803afdbaa9bed23409cbe04798429ca7f06 100644 (file)
@@ -1046,7 +1046,8 @@ QString HYDROData_CalculationCase::Export( int theStudyId ) const
   SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( theStudyId );
   
   QString aGeomObjEntry, anErrorMsg;
-  bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg );
+  QString statMess;
+  bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg, statMess );
   return isOK ? aGeomObjEntry : QString();
 #endif
 }
@@ -1055,7 +1056,8 @@ QString HYDROData_CalculationCase::Export( int theStudyId ) const
 bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
                                         SALOMEDS::Study_ptr theStudy,
                                         QString& theGeomObjEntry,
-                                        QString& theErrorMsg ) const
+                                        QString& theErrorMsg,
+                                        QString& statMess) const
 {
   HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfGroupsDefs;
 
@@ -1122,8 +1124,9 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
   if( aRes && !GetLandCoverMap().IsNull() && !GetStricklerTable().IsNull() )
   {
     QString aTelemacFileName = GetName() + ".telemac";
-    aRes = GetLandCoverMap()->ExportTelemac( aTelemacFileName, 1E-2, GetStricklerTable() );
-    theErrorMsg = QString( "The export to TELEMAC %1 failed" ).arg( aTelemacFileName );
+    aRes = GetLandCoverMap()->ExportTelemac( aTelemacFileName, 1E-2, GetStricklerTable(), statMess );
+    if (!aRes)
+      theErrorMsg = QString( "The export to TELEMAC %1 failed" ).arg( aTelemacFileName );
   }
   return aRes;
 }