mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-25 20:22:05 +05:00
Fix for bug NPAL14907(EDF 368 : AddToStudy and GetName).
This commit is contained in:
parent
57ff7bd09f
commit
94292c2770
@ -459,7 +459,6 @@ bool GEOMToolsGUI::Import()
|
||||
anObj = aInsOp->Import(fileN, fileT);
|
||||
|
||||
if ( !anObj->_is_nil() && aInsOp->IsDone() ) {
|
||||
anObj->SetName(GEOMBase::GetDefaultName(QObject::tr("GEOM_IMPORT")).latin1());
|
||||
QString aPublishObjName =
|
||||
GEOMBase::GetDefaultName(SUIT_Tools::file(fileName, /*withExten=*/true));
|
||||
|
||||
|
@ -202,6 +202,10 @@ void GEOMToolsGUI::OnRename()
|
||||
if ( !newName.isEmpty() ) {
|
||||
aName->SetValue( newName.latin1() ); // rename the SObject
|
||||
IObject->setName( newName.latin1() );// rename the InteractiveObject
|
||||
// Rename the corresponding GEOM_Object
|
||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
|
||||
if (!CORBA::is_nil( anObj ))
|
||||
anObj->SetName( newName.latin1() );
|
||||
(dynamic_cast<SalomeApp_Module*>(app->activeModule()))->updateObjBrowser( false );
|
||||
}
|
||||
} // if ( name attribute )
|
||||
|
@ -273,6 +273,9 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
||||
SALOMEDS::AttributeName_var aNameAttrib = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aNameAttrib->SetValue(aShapeName.ToCString());
|
||||
|
||||
//Set a name of the GEOM object
|
||||
aShape->SetName(theName);
|
||||
|
||||
return aResultSO._retn();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user