Salome HOME
Merge remote-tracking branch 'origin/BR_LAND_COVER' into BR_v14_rc
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_SplitPolylinesOp.cxx
index 73f415a8957783ee7e0e6d81bb8eef3f32855fb4..d6556fbafd290457137764ebfd5f4d8ef492d42c 100644 (file)
@@ -22,6 +22,7 @@
 #include <HYDROGUI_UpdateFlags.h>
 #include <HYDROGUI_Shape.h>
 #include <HYDROData_PolylineOperator.h>
+#include <HYDROData_Document.h>
 #include <LightApp_Application.h>
 #include <OCCViewer_ViewModel.h>
 #include <OCCViewer_ViewManager.h>
@@ -78,6 +79,7 @@ bool HYDROGUI_SplitPolylinesOp::processApply( int& theUpdateFlags,
   if ( !aPanel )
     return false;
 
+  QString aName = aPanel->GetResultName();
   Handle( HYDROData_PolylineXY ) aMainPolyline = aPanel->GetMainPolyline();
   Handle( HYDROData_PolylineXY ) aToolPolyline = aPanel->GetToolPolyline();
   HYDROData_SequenceOfObjects aPolylinesList = aPanel->GetPolylines();
@@ -87,13 +89,13 @@ bool HYDROGUI_SplitPolylinesOp::processApply( int& theUpdateFlags,
   switch( aPanel->GetMode() )
   {
   case HYDROGUI_SplitPolylinesDlg::ByPoint:
-    anOp.Split( aMainPolyline, aPoint );
+    anOp.Split( doc(), aName.toLatin1().data(), aMainPolyline, aPoint );
     break;
   case HYDROGUI_SplitPolylinesDlg::ByTool:
-    anOp.Split( aMainPolyline, aToolPolyline );
+    anOp.Split( doc(), aName.toLatin1().data(), aMainPolyline, aToolPolyline );
     break;
   case HYDROGUI_SplitPolylinesDlg::Split:
-    anOp.Split( aPolylinesList );
+    anOp.Split( doc(), aName.toLatin1().data(), aPolylinesList );
     break;
   }