mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0028987: Visualization, SelectMgr_SelectableObject - move out iterator from object
Added method SelectMgr_SelectableObject::Selections() and depreacted methods Init(), More(), Next() and CurrentSelection(). Added method SelectMgr_Selection::Entities() and depreacted methods Init(), More(), Next() and Sensitivity(). SelectMgr_SelectableObject::myAssemblyOwner has been moved to AIS_MultipleConnectedInteractive. SelectMgr_SelectableObject::Selection() now returns NULL handle for not found selection. SelectMgr_SelectableObject::HasSelection() is no more virtual and just retuns !Selection().IsNull(). SelectMgr_SelectionManager::mySelectors map is now declared using proper key type Handle(SelectMgr_ViewerSelector) instead of Handle(Standard_Transient).
This commit is contained in:
@@ -115,9 +115,11 @@ static Standard_Integer OCC137 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
if(AISObj->HasSelection(4)) {
|
||||
//Handle(SelectMgr_Selection)& aSelection = AISObj->Selection(4);
|
||||
const Handle(SelectMgr_Selection)& aSelection = AISObj->Selection(4);
|
||||
if(!aSelection.IsNull()) {
|
||||
for(aSelection->Init();aSelection->More();aSelection->Next()) {
|
||||
Handle(StdSelect_BRepOwner) aO = Handle(StdSelect_BRepOwner)::DownCast(aSelection->Sensitive()->BaseSensitive()->OwnerId());
|
||||
if(!aSelection.IsNull())
|
||||
{
|
||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||
{
|
||||
Handle(StdSelect_BRepOwner) aO = Handle(StdSelect_BRepOwner)::DownCast(aSelEntIter.Value()->BaseSensitive()->OwnerId());
|
||||
aO->SetHilightMode(Draw::Atoi(argv[1]));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user