X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FpPlotterWindow.cxx;h=76ffc6a7b13b891006e46d79afb5273d8901358a;hb=9dd39f42ca5abd6ce26dccc8617e5edd30517587;hp=4fb13342677e2bb7e0f3ed79dddfb8b03b4f3109;hpb=063777593408e340c3fb5f0aa9b584c3371ca65d;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx index 4fb1334..76ffc6a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx @@ -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;