mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 21:40:33 +05:00
do not add a reference to useCaseBuilder twice
This commit is contained in:
parent
fc83dc7660
commit
68cf640188
@ -412,12 +412,14 @@ static void addReference (SALOMEDS::Study_ptr theStudy,
|
|||||||
theTag = tag;
|
theTag = tag;
|
||||||
}
|
}
|
||||||
if ( !theSObject->FindSubObject( theTag, aReferenceSO.inout() ))
|
if ( !theSObject->FindSubObject( theTag, aReferenceSO.inout() ))
|
||||||
|
{
|
||||||
aReferenceSO = aStudyBuilder->NewObjectToTag( theSObject, theTag );
|
aReferenceSO = aStudyBuilder->NewObjectToTag( theSObject, theTag );
|
||||||
|
// add reference to the use case tree
|
||||||
|
// (to support tree representation customization and drag-n-drop)
|
||||||
|
SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
|
||||||
|
useCaseBuilder->AppendTo( aReferenceSO->GetFather(), aReferenceSO );
|
||||||
|
}
|
||||||
aStudyBuilder->Addreference( aReferenceSO, aToObjSO );
|
aStudyBuilder->Addreference( aReferenceSO, aToObjSO );
|
||||||
// add reference to the use case tree
|
|
||||||
// (to support tree representation customization and drag-n-drop)
|
|
||||||
SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
|
|
||||||
useCaseBuilder->AppendTo( aReferenceSO->GetFather(), aReferenceSO );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user