*/
pGraphicalFunction* pPlotterWindow::getFunction(int index)
{
- wxNode* node=functions.Item(index);
- if(node==NULL){
+ wxNode* node=NULL;
+ if (functions.size()>index)
+ {
+ node=functions.Item(index);
+ } // if
+
+ if(node==NULL)
+ {
return NULL;
- }
+ } // if node
return (pGraphicalFunction*)node->GetData();
}
+
+
/*
move the functions that the user wants to move
and that were set in functionsToMove
@param porcentageMaxX:the percentage that the maxShowed
of the functions have to be move
0<=porcentageMaxX<=1
-
*/
-
void pPlotterWindow::moveFunctions( float porcentageMinX,float porcentageMaxX)
{
//Adding the actual function