- TopoDS_Shape aShape = getSelectionShape();
- if (!aShape.IsNull()) {
- Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
- aSelectionPrs->Clear();
-
- StdPrs_WFDeflectionShape::Add(aSelectionPrs, aShape, myDrawer);
-
- aSelectionPrs->SetDisplayPriority(9);
- aSelectionPrs->Highlight(Aspect_TOHM_COLOR, aSelectionPrs->HighlightColor());
- aSelectionPrs->Display();
- thePM->Highlight(this);
+ Handle(SelectMgr_EntityOwner) anOwner;
+ Handle(ModuleBase_BRepOwner) aCompOwner;
+ for (int i = 1; i <= theOwners.Length(); i++) {
+ anOwner = theOwners.Value(i);
+ aCompOwner = Handle(ModuleBase_BRepOwner)::DownCast(anOwner);
+ if (aCompOwner.IsNull())
+ anOwner->Hilight(thePM);
+ else {
+ TopoDS_Shape aShape = aCompOwner->Shape();
+ Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
+ aSelectionPrs->Clear();
+
+ StdPrs_WFDeflectionShape::Add(aSelectionPrs, aShape, myDrawer);
+
+ aSelectionPrs->SetDisplayPriority(9);
+ aSelectionPrs->Highlight(Aspect_TOHM_COLOR, aSelectionPrs->HighlightColor());
+ aSelectionPrs->Display();
+ thePM->Highlight(this);
+ }