if (theType == CurveCreator_Operation::SetType ||
theType == CurveCreator_Operation::SetClosed ||
theType == CurveCreator_Operation::MoveSection ||
+ theType == CurveCreator_Operation::RemovePoints ||
theType == CurveCreator_Operation::Join) {
int *pData = (int *)allocate(2*sizeof(int));
switch (myType) {
case CurveCreator_Operation::AddPoints:
+ case CurveCreator_Operation::InsertPoints:
{
CurveCreator::Coordinates aCoords;
- getCoords(&pInt[1], aCoords);
- theCurve->addPoints(aCoords, pInt[0]);
+ getCoords(&pInt[2], aCoords);
+ std::vector<int> anISections, anIPnts;
+ anISections.push_back( pInt[0] );
+ anIPnts.push_back( pInt[1] );
+ theCurve->addPointsInternal(aCoords, anISections, anIPnts);
}
break;
case CurveCreator_Operation::RemovePoints:
-//AKL: TODO Undo/Redo support theCurve->removePoints(pInt[0], pInt[1], pInt[2]);
- break;
- case CurveCreator_Operation::InsertPoints:
{
- CurveCreator::Coordinates aCoords;
-
- getCoords(&pInt[2], aCoords);
- theCurve->addPoints(aCoords, pInt[0], pInt[1]);
+ std::vector<int> anISections, anIPnts;
+ anISections.push_back( pInt[0] );
+ anIPnts.push_back( pInt[1] );
+ theCurve->removePointsInternal(anISections, anIPnts);
}
break;
case CurveCreator_Operation::SetType:
{
const CurveCreator::SectionType aType = (CurveCreator::SectionType) pInt[0];
- theCurve->setSectionType( pInt[1], aType );
+ theCurve->setSectionTypeInternal( pInt[1], aType );
}
break;
case CurveCreator_Operation::Clear:
- theCurve->clear();
+ theCurve->clearInternal();
break;
case CurveCreator_Operation::SetCoordinates:
{
CurveCreator::Coordinates aCoords;
getCoords(&pInt[2], aCoords);
- theCurve->setPoint(pInt[0], pInt[1], aCoords);
+ theCurve->setPointInternal(pInt[0], pInt[1], aCoords);
}
break;
case CurveCreator_Operation::SetClosed:
- theCurve->setClosed((pInt[0] != 0), pInt[1]);
+ theCurve->setClosedInternal((pInt[0] != 0), pInt[1]);
+ break;
+ case CurveCreator_Operation::MoveSection:
+ theCurve->moveSectionInternal(pInt[0], pInt[1]);
break;
-/* case CurveCreator_Operation::MoveSection:
- theCurve->moveSection(pInt[0], pInt[1]);
- break;*/
case CurveCreator_Operation::Join:
if (myPData == NULL) {
- theCurve->join();
+ theCurve->joinInternal();
} else {
- theCurve->join(pInt[0], pInt[1]);
+ theCurve->joinInternal(pInt[0], pInt[1]);
}
break;
case CurveCreator_Operation::AddSection:
char* aPtr = ((char*)&pInt[2]);
aPtr += (aName.length()) + 1;
getCoords((int*)aPtr, aCoords);
- theCurve->addSection(aName, aType, (pInt[1] != 0), aCoords);
+ theCurve->addSectionInternal(aName, aType, (pInt[1] != 0), aCoords);
}
break;
case CurveCreator_Operation::RemoveSection:
- theCurve->removeSection(pInt[0]);
+ theCurve->removeSectionInternal(pInt[0]);
break;
case CurveCreator_Operation::RenameSection:
{
std::string aName = std::string((char*)&pInt[1]);
- theCurve->setSectionName(pInt[0], aName);
+ theCurve->setSectionNameInternal(pInt[0], aName);
}
break;
default: