]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #493: fix bugs
authormzn <mzn@opencascade.com>
Mon, 30 Mar 2015 14:29:29 +0000 (17:29 +0300)
committermzn <mzn@opencascade.com>
Mon, 30 Mar 2015 14:29:29 +0000 (17:29 +0300)
src/HYDROData/HYDROData_Stream.cxx
src/HYDROGUI/HYDROGUI_ProfileInterpolateOp.cxx

index 6610c1fc0b8d9cc32853b18cc449877751d0623e..0a35a208dc2b1d4771b9c0e6d53ac30b6697b984 100644 (file)
@@ -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;
index 362ceb6ea291c8e5a1775b3542c1b5318174dc34..7caefc3b9a22c621b75f3b40431c67b9bb0df118 100644 (file)
@@ -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 );
         }
     }