mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 07:40:32 +05:00
do not add a reference to useCaseBuilder twice
This commit is contained in:
parent
fc83dc7660
commit
68cf640188
@ -412,13 +412,15 @@ 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 );
|
||||||
aStudyBuilder->Addreference( aReferenceSO, aToObjSO );
|
|
||||||
// add reference to the use case tree
|
// add reference to the use case tree
|
||||||
// (to support tree representation customization and drag-n-drop)
|
// (to support tree representation customization and drag-n-drop)
|
||||||
SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
|
SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder();
|
||||||
useCaseBuilder->AppendTo( aReferenceSO->GetFather(), aReferenceSO );
|
useCaseBuilder->AppendTo( aReferenceSO->GetFather(), aReferenceSO );
|
||||||
}
|
}
|
||||||
|
aStudyBuilder->Addreference( aReferenceSO, aToObjSO );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user