{
if( myTopoShape.IsNull() )
return Handle_AIS_InteractiveObject();
- else
- if ( myObject->IsKind( STANDARD_TYPE(HYDROData_PolylineXY) ) ||
- myObject->IsKind( STANDARD_TYPE(HYDROData_Polyline3D)) ||
- myObject->IsKind( STANDARD_TYPE(HYDROData_Profile) ))
- return new HYDROGUI_Polyline(myTopoShape);
- else
- return new AIS_Shape( myTopoShape );
+
+ TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType();
+ if ( aShapeType==TopAbs_EDGE || aShapeType==TopAbs_WIRE ) {
+ return new HYDROGUI_Polyline( myTopoShape );
+ } else {
+ return new AIS_Shape( myTopoShape );
+ }
}
void HYDROGUI_Shape::buildShape()