From: jfa Date: Thu, 23 Aug 2012 08:49:51 +0000 (+0000) Subject: Mantis issue 0021805: EDF GEOM: Internal name of STEP file is always used, name given... X-Git-Tag: V6_6_0a1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a162a53e32e4a152727d35b5c5dee8fe24b5f71a;p=modules%2Fgeom.git Mantis issue 0021805: EDF GEOM: Internal name of STEP file is always used, name given by addToStudy is ignored --- diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index fe877f791..d98bec0e1 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -748,6 +748,11 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr theStudy, aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName); if(aResultSO->_is_nil()) return aResultSO._retn(); + // ignore internal name (for example, read from STEP file) + // in case of publishing from script + if (strlen(theName) > 0) + aResultSO->SetAttrString("AttributeName", theName); + GEOM::ListOfGO_var aList = theObject->GetDependency(); Standard_Integer aLength = aList->length(); if(aLength < 1) return aResultSO._retn();