#include <StdPrs_WFDeflectionShape.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <AIS_InteractiveContext.hxx>
+#include <AIS_Selection.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
// Activate individual repaintng if this is a part of compsolid
ResultCompSolidPtr aCompSolid = ModelAPI_Tools::compSolidOwner(myResult);
- SetAutoHilight(aCompSolid.get() == NULL);
+ //SetAutoHilight(aCompSolid.get() == NULL);
}
void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
const SelectMgr_SequenceOfOwner& theOwners)
{
- TopoDS_Shape aShape = getSelectionShape();
- if (!aShape.IsNull()) {
+ if (hasCompSolidSelectionMode()) {
+ TopoDS_Shape aShape = getSelectionShape();
Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
aSelectionPrs->Clear();
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);
+ }
+ }
}
}