Salome HOME
refs #1340 part.2
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_PolylineOp.cxx
index 486b182e5d150c5ddac9831350c8fb08cd2bc4a1..a59af02da79c5366e2075e689443812b797250a9 100755 (executable)
@@ -22,6 +22,7 @@
 #include "HYDROGUI_DataObject.h"
 #include "HYDROGUI_PolylineDlg.h"
 #include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool2.h"
 #include "HYDROGUI_UpdateFlags.h"
 
 #include <HYDROData_Document.h>
@@ -152,7 +153,10 @@ void HYDROGUI_PolylineOp::startOperation()
     NCollection_Sequence<TCollection_AsciiString>           aSectNames;
     NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
     NCollection_Sequence<bool>                              aSectClosures;
+    bool aIsInCustom = myEditedObject->GetIsInCustomFlag();
+    myEditedObject->SetIsInCustomFlag( true );
     myEditedObject->GetSections( aSectNames, aSectTypes, aSectClosures );
+    myEditedObject->SetIsInCustomFlag( aIsInCustom );
 
     if (!aSectNames.IsEmpty())
     {
@@ -349,8 +353,8 @@ bool HYDROGUI_PolylineOp::processApply( int& theUpdateFlags,
 
     aPolylineObj->AddSection( aSectName, aSectType, aSectClosure );
 
-    // Add the points fro section
-    CurveCreator::Coordinates aCurveCoords = myCurve->getPoints( i );
+    // Add the points from section
+    CurveCreator::Coordinates aCurveCoords = myCurve->getCoords( i );
 
     if ( aCurveCoords.size() <= 2 )
     {