aSection2->myPoints.begin(),
aSection2->myPoints.end());
- res = removeSection(theISectionFrom);
+ res = removeSectionInternal(theISectionFrom);
redisplayCurve();
return res;
}
setNbUndos(3);
}
+ // Construct undo for RemovePoints command.
+ int anISection = theIntParam1;
+ const int aNbPoints2 = theCurve->getNbPoints(theIntParam2);
+ CurveCreator_ICurve::SectionToPointList aSectionToPointList;
+ int aJoinedSize = aNbPoints + aNbPoints2;
+ for (int anIPoint = aNbPoints; anIPoint < aJoinedSize; anIPoint++)
+ aSectionToPointList.push_back(std::make_pair( anISection, anIPoint ) );
isOK = myPUndo[0].init(CurveCreator_Operation::RemovePoints,
- theIntParam1, aNbPoints, -1);
+ aSectionToPointList);
+
+ //isOK = myPUndo[0].init(CurveCreator_Operation::RemovePoints,
+ // theIntParam1, aNbPoints, -1);
if (isOK) {
isOK = addSectionToUndo(theCurve, theIntParam2, myPUndo[1]);