mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 01: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);
|
anObj = aInsOp->Import(fileN, fileT);
|
||||||
|
|
||||||
if ( !anObj->_is_nil() && aInsOp->IsDone() ) {
|
if ( !anObj->_is_nil() && aInsOp->IsDone() ) {
|
||||||
anObj->SetName(GEOMBase::GetDefaultName(QObject::tr("GEOM_IMPORT")).latin1());
|
|
||||||
QString aPublishObjName =
|
QString aPublishObjName =
|
||||||
GEOMBase::GetDefaultName(SUIT_Tools::file(fileName, /*withExten=*/true));
|
GEOMBase::GetDefaultName(SUIT_Tools::file(fileName, /*withExten=*/true));
|
||||||
|
|
||||||
|
@ -202,6 +202,10 @@ void GEOMToolsGUI::OnRename()
|
|||||||
if ( !newName.isEmpty() ) {
|
if ( !newName.isEmpty() ) {
|
||||||
aName->SetValue( newName.latin1() ); // rename the SObject
|
aName->SetValue( newName.latin1() ); // rename the SObject
|
||||||
IObject->setName( newName.latin1() );// rename the InteractiveObject
|
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 );
|
(dynamic_cast<SalomeApp_Module*>(app->activeModule()))->updateObjBrowser( false );
|
||||||
}
|
}
|
||||||
} // if ( name attribute )
|
} // if ( name attribute )
|
||||||
|
@ -272,6 +272,9 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
|
|||||||
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeName");
|
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeName");
|
||||||
SALOMEDS::AttributeName_var aNameAttrib = SALOMEDS::AttributeName::_narrow(anAttr);
|
SALOMEDS::AttributeName_var aNameAttrib = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||||
aNameAttrib->SetValue(aShapeName.ToCString());
|
aNameAttrib->SetValue(aShapeName.ToCString());
|
||||||
|
|
||||||
|
//Set a name of the GEOM object
|
||||||
|
aShape->SetName(theName);
|
||||||
|
|
||||||
return aResultSO._retn();
|
return aResultSO._retn();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user