void HYDROGUI_Shape::setBorderColor( const QColor& theColor,
const bool theToDisplay,
const bool theIsUpdateViewer )
-{
+{
myBorderColor = theColor;
updateShape( theToDisplay, theIsUpdateViewer );
}
Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const
{
- if( myTopoShape.IsNull() )
+ 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()