bool includedPoint = realPoints.Append(newPoint)!=NULL;
if(includedPoint)
{
- bool order=orderPoints();
+ bool order=true;
+ if(realPoints.size()>1){
+ order=orderPoints();
+ }
+
return order;
}
return includedPoint;
int nextX;
// Used for validating 'leftToRigthDef'
- pFunctionPoint* ordFirstPoint = (pFunctionPoint*)realPoints.GetFirst()-> GetData();
- pFunctionPoint* ordLastPoint = (pFunctionPoint*)(lastNodeIncluded->GetPrevious())-> GetData();
+ pFunctionPoint* ordFirstPoint = NULL;
+ pFunctionPoint* ordLastPoint = NULL;
+ if(node!=NULL){
+ ordFirstPoint = (pFunctionPoint*)realPoints.GetFirst()-> GetData();
+ }
+ if(lastNodeIncluded->GetPrevious()!=NULL){
+ ordLastPoint = (pFunctionPoint*)(lastNodeIncluded->GetPrevious())-> GetData();
+ }
// Normal drawing
if(node)//point!=NULL)
{
- pFunctionPoint* point=(pFunctionPoint*)node->GetData();
+ //pFunctionPoint* point=(pFunctionPoint*)node->GetData(); // JPRx
bool deleted=realPoints.DeleteNode(node);
//delete point;
//delete node;