diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx index e76fa32a8e..2895a02388 100644 --- a/src/StdPrs/StdPrs_ShadedShape.cxx +++ b/src/StdPrs/StdPrs_ShadedShape.cxx @@ -60,21 +60,19 @@ namespace const TopoDS_Shape& theShape, const Handle (Prs3d_Drawer)& theDrawer) { - Standard_Boolean aDrawAllVerticesFlag = (theDrawer->VertexDrawMode() == Prs3d_VDM_All); - - if (!aDrawAllVerticesFlag && theShape.ShapeType() != TopAbs_COMPOUND) - { - return; - } - TopExp_Explorer aShapeIter (theShape, TopAbs_FACE); if (!aShapeIter.More()) { - // compound contains no shaded elements at all StdPrs_WFShape::Add (thePrs, theShape, theDrawer); return; } + const Standard_Boolean aDrawAllVerticesFlag = (theDrawer->VertexDrawMode() == Prs3d_VDM_All); + if (!aDrawAllVerticesFlag && theShape.ShapeType() != TopAbs_COMPOUND) + { + return; + } + // We have to create a compound and collect all subshapes not drawn by the shading algo. // This includes: // - isolated edges