]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / pPlotterWindow.cxx
index 4fb13342677e2bb7e0f3ed79dddfb8b03b4f3109..76ffc6a7b13b891006e46d79afb5273d8901358a 100644 (file)
@@ -200,6 +200,7 @@ wxPoint pPlotterWindow:: getRealPoint(wxPoint pixelPoint)
 void pPlotterWindow::setActualScales()
 {
        // int maxX,maxY,minX,minY; // JPRx
+       int maxX,maxY;//,minX,minY; // JPRx  //EED
        /*
        if the function is drawed interactively the maxX and the 
        maxY in actual are sets by the user
@@ -1387,10 +1388,15 @@ int pPlotterWindow:: addFunction(pGraphicalFunction * function)
                function->initializeSplineVectors();
                UpdateAll();
        }
-       // bool added1= functions.Append(function)!=NULL; // JPRx
+       
+//     bool added1= functions.Append(function)!=NULL; // JPRx
+       functions.Append(function);  //EED      
        
        int id=functions.IndexOf(function);
-       /* bool added2= */ AddLayer(function);// JPRx
+       
+       // bool added2=  AddLayer(function);// JPRx
+       AddLayer(function); //EED
+        
        UpdateAll();
        return id;//added1 && added2;
 }
@@ -1710,6 +1716,9 @@ void pPlotterWindow :: OnGuideLines (wxCommandEvent   &event)
 pGraphicalFunction* pPlotterWindow::getFunction(int index)
 {
        wxNode* node=functions.Item(index);
+       if(node==NULL){
+               return NULL;
+       }
        return (pGraphicalFunction*)node->GetData();
 }
 /*
@@ -1796,7 +1805,9 @@ void pPlotterWindow::moveFunctions( float porcentageMinX,float porcentageMaxX)
 */
 int pPlotterWindow::addFunctionToMove(pGraphicalFunction *function)
 {
-       // bool added1=  functionsToMove.Append(function)!=NULL; // JPRx
+       //bool added1=  functionsToMove.Append(function)!=NULL; // JPRx
+       functionsToMove.Append(function); // EED
+       
        int id=functionsToMove.IndexOf(function);
        UpdateAll();
        return id;