From: isn Date: Thu, 11 Jun 2015 08:29:33 +0000 (+0300) Subject: refs #579 X-Git-Tag: v1.4.1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=852bfa6815309d82b4340d0b108a3b602ebda5fa;p=modules%2Fhydro.git refs #579 --- diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index c430bb51..05e271dd 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -480,7 +480,17 @@ Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const return Handle_AIS_InteractiveObject(); TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType(); - if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE ) { + bool IsWireEdgeCompound = aShapeType==TopAbs_COMPOUND; + if (IsWireEdgeCompound) { + TopoDS_Iterator itr(myTopoShape); + while (itr.More() && IsWireEdgeCompound) { + if (itr.Value().ShapeType() != TopAbs_WIRE && itr.Value().ShapeType() != TopAbs_EDGE) + IsWireEdgeCompound = false; + itr.Next(); + } + } + + if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE || IsWireEdgeCompound) { return new HYDROGUI_Polyline( myTopoShape ); } else { return new AIS_Shape( myTopoShape );