X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FpPlotterWindow.cxx;h=ea0be8fe85c003f009ff38ad7860058f22605576;hb=80b04dc9e3b981e24fe9ae0d81cdeb8af6e6f8c1;hp=5115e2d33b47c2dbf48f7e470f94913558877108;hpb=63a0a21e6736a800c58442edd531c91d75e71694;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 5115e2d..ea0be8f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pPlotterWindow.cxx @@ -1740,12 +1740,20 @@ void pPlotterWindow :: OnGuideLines (wxCommandEvent &event) */ 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 @@ -1755,9 +1763,7 @@ pGraphicalFunction* pPlotterWindow::getFunction(int index) @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