]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Mantis issue 0021805: EDF GEOM: Internal name of STEP file is always used, name given...
authorjfa <jfa@opencascade.com>
Thu, 23 Aug 2012 08:49:51 +0000 (08:49 +0000)
committerjfa <jfa@opencascade.com>
Thu, 23 Aug 2012 08:49:51 +0000 (08:49 +0000)
src/GEOM_I/GEOM_Gen_i.cc

index fe877f791556c7ede77273f58b7482b28a1ffa4a..d98bec0e12cf0ee921a3c9ce0b934a5e38a7bc4a 100644 (file)
@@ -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();