From: eap Date: Thu, 22 May 2008 08:43:10 +0000 (+0000) Subject: PAL19785 Anomaly UnionGroup + hdf save X-Git-Tag: V4_1_3rc1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ca799421eb80822660867aff58b2e48c778575a2;p=modules%2Fsmesh.git PAL19785 Anomaly UnionGroup + hdf save Prevent from whitespace being the last char of family name --- diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx index 69265bb1d..45aa1e30a 100644 --- a/src/DriverMED/DriverMED_Family.cxx +++ b/src/DriverMED/DriverMED_Family.cxx @@ -318,9 +318,17 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper, for(; aGrIter != myGroupNames.end(); aGrIter++){ aStr << "_" << *aGrIter; } + string aValue = aStr.str(); + // PAL19785 - med forbids whitespace to be the last char in the name + MED::TInt maxSize; + if ( theWrapper->GetVersion() == MED::eV2_1 ) + maxSize = MED::GetNOMLength(); + else + maxSize = MED::GetNOMLength(); + if ( aValue.size() >= maxSize && aValue[ maxSize-1 ] == ' ' ) + aValue[ maxSize-1 ] = '_'; MED::PFamilyInfo anInfo; - string aValue = aStr.str(); if(myId == 0 || myGroupAttributVal == 0){ anInfo = theWrapper->CrFamilyInfo(theMeshInfo, aValue,