From: mzn Date: Mon, 30 Mar 2015 14:29:29 +0000 (+0300) Subject: refs #493: fix bugs X-Git-Tag: BR_hydro_v_1_0_5~15^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d8b6bd16c744f2704c01fc83f9426aea1849f659;p=modules%2Fhydro.git refs #493: fix bugs --- 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 ); } }