// purpose :
// =======================================================================
bool VInspector_Tools::IsOwnerSelected (const Handle(AIS_InteractiveContext)& theContext,
- const Handle(SelectBasics_EntityOwner)& theOwner)
+ const Handle(SelectMgr_EntityOwner)& theOwner)
{
bool anIsSelected = false;
- Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (theOwner);
+ Handle(SelectMgr_EntityOwner) anOwner = theOwner;
for (theContext->InitSelected(); theContext->MoreSelected() && !anIsSelected; theContext->NextSelected())
anIsSelected = theContext->SelectedOwner() == anOwner;
return anIsSelected;
// function : ContextOwners
// purpose :
// =======================================================================
-NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ContextOwners (
+NCollection_List<Handle(SelectMgr_EntityOwner)> VInspector_Tools::ContextOwners (
const Handle(AIS_InteractiveContext)& theContext)
{
- NCollection_List<Handle(SelectBasics_EntityOwner)> aResultOwners;
+ NCollection_List<Handle(SelectMgr_EntityOwner)> aResultOwners;
if (theContext.IsNull())
return aResultOwners;
#endif
if (anEntity.IsNull())
continue;
- const Handle(SelectBasics_SensitiveEntity)& aBase = anEntity->BaseSensitive();
- Handle(SelectBasics_EntityOwner) anOwner = aBase->OwnerId();
+ const Handle(Select3D_SensitiveEntity)& aBase = anEntity->BaseSensitive();
+ Handle(SelectMgr_EntityOwner) anOwner = aBase->OwnerId();
Standard_Transient* anOwnerPtr = anOwner.operator->();
if (aSelectedIds.contains ((size_t)anOwnerPtr))
continue;
// function : ActiveOwners
// purpose :
// =======================================================================
-NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ActiveOwners (
+NCollection_List<Handle(SelectMgr_EntityOwner)> VInspector_Tools::ActiveOwners (
const Handle(AIS_InteractiveContext)& theContext,
- NCollection_List<Handle(SelectBasics_EntityOwner)>& theEmptySelectableOwners)
+ NCollection_List<Handle(SelectMgr_EntityOwner)>& theEmptySelectableOwners)
{
- NCollection_List<Handle(SelectBasics_EntityOwner)> aResultOwners;
+ NCollection_List<Handle(SelectMgr_EntityOwner)> aResultOwners;
// only local context is processed: TODO for global context
Handle(AIS_InteractiveContext) aContext = theContext;
if (aContext.IsNull())
return aResultOwners;
- NCollection_List<Handle(SelectBasics_EntityOwner)> anActiveOwners;
+ NCollection_List<Handle(SelectMgr_EntityOwner)> anActiveOwners;
// OCCT BUG:1 - equal pointer owners are appears in the list
#if OCC_VERSION_HEX > 0x060901
aContext->MainSelector()->ActiveOwners (anActiveOwners);
anActiveOwners = aContext->MainSelector()->ActiveOwners();
#endif
QList<size_t> aSelectedIds; // Remember of selected address in order to avoid duplicates
- Handle(SelectMgr_EntityOwner) anOwner;
- for (NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt (anActiveOwners);
+ for (NCollection_List<Handle(SelectMgr_EntityOwner)>::Iterator anOwnersIt (anActiveOwners);
anOwnersIt.More(); anOwnersIt.Next())
{
- anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
+ const Handle(SelectMgr_EntityOwner)& anOwner = anOwnersIt.Value();
if (anOwner.IsNull())
continue;
// purpose :
// =======================================================================
void VInspector_Tools::AddOrRemoveSelectedShapes (const Handle(AIS_InteractiveContext)& theContext,
- const NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners)
+ const NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners)
{
// TODO: the next two rows are to be removed later
theContext->UnhilightSelected(false);
theContext->UnhilightSelected(Standard_False);
- for (NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt(theOwners);
+ for (NCollection_List<Handle(SelectMgr_EntityOwner)>::Iterator anOwnersIt(theOwners);
anOwnersIt.More(); anOwnersIt.Next())
{
- Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
+ Handle(SelectMgr_EntityOwner) anOwner = anOwnersIt.Value();
theContext->AddOrRemoveSelected (anOwner, Standard_False);
}
theContext->UpdateCurrentViewer();