From d8b6bd16c744f2704c01fc83f9426aea1849f659 Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 30 Mar 2015 17:29:29 +0300 Subject: [PATCH] refs #493: fix bugs --- src/HYDROData/HYDROData_Stream.cxx | 5 ++++- src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 6610c1fc..0a35a208 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -1173,7 +1173,10 @@ bool HYDROData_Stream::Interpolate( HYDROData_IProfilesInterpolator* theInterpol aProfile->SetProfilePoints( aProfilePoints ); // Add profile to the stream - isOK = AddProfile( aProfile ) && isOK; + bool isAdded = AddProfile( aProfile ); + if ( !isAdded ) { + aProfile->Remove(); + } } return isOK; diff --git a/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx b/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx index 362ceb6e..7caefc3b 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx @@ -300,7 +300,7 @@ TopoDS_Shape HYDROGUI_ProfileInterpolateOp::previewShape( HYDROData_IProfilesInt pointSeq.Append( gp_XYZ( aPoints[i], aPoints[i+1], aPoints[i+2] ) ); TopoDS_Shape aWire = HYDROData_PolylineXY::BuildWire( HYDROData_IPolyline::SECTION_SPLINE, false, pointSeq ); if ( !aWire.IsNull() ) - aBuilder.Add( aWire, aPreviewShape ); + aBuilder.Add( aPreviewShape, aWire ); } } -- 2.39.2