0026885: Visualization - drop redundant aspects from structure level
[occt.git] / src / AIS / AIS_Manipulator.cxx
index 2434229..6bc3bb0 100644 (file)
@@ -878,7 +878,16 @@ void AIS_Manipulator::HilightOwnerWithColor (const Handle(PrsMgr_PresentationMan
     return;
   }
   aPresentation->Highlight (Aspect_TOHM_COLOR, theColor);
-  aPresentation->SetShadingAspect (myHighlightAspect);
+  for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPresentation->Groups());
+       aGroupIter.More(); aGroupIter.Next())
+  {
+    Handle(Graphic3d_Group)& aGrp = aGroupIter.ChangeValue();
+    if (!aGrp.IsNull()
+     && aGrp->IsGroupPrimitivesAspectSet (Graphic3d_ASPECT_FILL_AREA))
+    {
+      aGrp->SetGroupPrimitivesAspect (myHighlightAspect->Aspect());
+    }
+  }
   aPresentation->SetZLayer (Graphic3d_ZLayerId_Topmost);
   thePM->AddToImmediateList (aPresentation);