- if (hasCompSolidSelectionMode()) {
- TopoDS_Shape aShape = getSelectionShape();
- 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);
- } else {
- Handle(SelectMgr_EntityOwner) anOwner;
- for (int i = 1; i <= theOwners.Length(); i++) {
- anOwner = theOwners.Value(i);
- if (!anOwner->IsSelected()) { // anOwner is not selected
- anOwner->SetSelected(true);
- AIS_Selection::Select(anOwner);
- }
+ 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);