From: eap Date: Tue, 8 Sep 2015 11:47:10 +0000 (+0300) Subject: 23155: [CEA 1578] Sauv2med fails during the creation of groups there are several... X-Git-Tag: V7_7_0b1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9057f65cb457f74c5083415a5f44e01184aac609;p=modules%2Fmed.git 23155: [CEA 1578] Sauv2med fails during the creation of groups there are several references --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 28a54e390..dd2ba8961 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -3265,8 +3265,11 @@ void IntermediateMED::setGroups( ParaMEDMEM::MEDFileUMesh* mesh ) // Issue 0021311. Use case: a gibi group has references (recorded in pile 1) // and several names (pile 27) refer (pile 10) to this group. // We create a copy of this group per each named reference + std::set uniqueNames; + uniqueNames.insert( grp._name ); for ( unsigned iRef = 0 ; iRef < grp._refNames.size(); ++iRef ) - if ( !grp._refNames[ iRef ].empty() ) + if ( !grp._refNames[ iRef ].empty() && + uniqueNames.insert( grp._refNames[ iRef ]).second ) // for name uniqueness (23155) { refGroups.push_back( grp._medGroup->deepCpy() ); refGroups.back()->setName( grp._refNames[ iRef ].c_str() );