- if (anOwner->Selectable() != anAISIO)
- continue;
- getAttributesOrResults(anOwner, theFeature, theSketch, aResult,
- aSelectedAttributes, aSelectedResults);
+ Handle(AIS_InteractiveObject) anAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
+ for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
+ {
+ Handle(SelectMgr_EntityOwner) anOwner = aContext->SelectedOwner();
+ if (anOwner->Selectable() != anAISIO)
+ continue;
+ getAttributesOrResults(anOwner, theFeature, theSketch, aResult,
+ aSelectedAttributes, aSelectedResults);
+ }
+ for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
+ Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner();
+ if (anOwner.IsNull())
+ continue;
+ if (anOwner->Selectable() != anAISIO)
+ continue;
+ getAttributesOrResults(anOwner, theFeature, theSketch, aResult,
+ aSelectedAttributes, aSelectedResults);
+ }