]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pGraphicalFunction.cxx
- Comment out uselesss #define MAX (vtk-4.5 doesn't compile)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / pGraphicalFunction.cxx
index b04e17c81bacb5a648d8dacb8c735f85b3a7691d..0eed1ed66fa2c6317cfc4e3f626cac72e757a2fe 100644 (file)
@@ -159,15 +159,18 @@ bool pGraphicalFunction:: AddNewPoint(int x,int y)
 */
 bool pGraphicalFunction::AddPoint(int aX, int aY,bool order) 
 {      
-       
-       bool added=logicFunction -> AddPoint( aX, aY,order );
-       if(!fromWindow)
-        setUp();
-       else
-       {
-               logicFunction->setEndPoints();
-               logicFunction->setStartPoints();
-       }
+       printf("EED %p pGraphicalFunction::AddPoint %p (%d %d) \n", this, logicFunction, aX, aY);       
+       bool added=false;
+       if (logicFunction!=NULL){
+               added=logicFunction -> AddPoint( aX, aY,order );
+               if(!fromWindow)
+                       setUp();
+               else
+               {
+                       logicFunction->setEndPoints();
+                       logicFunction->setStartPoints();
+               } // if fromWindow
+       } // if logicFunction
        return added;
 }
 
@@ -822,7 +825,7 @@ void pGraphicalFunction :: setColorPoints(std::vector<pColorPoint *> &colorVecto
 {
        f_colorPoints.clear();
        int i = 0;      
-       while(i<colorVector.size())
+       while(i<(int)(colorVector.size()))
        {
                f_colorPoints.push_back(colorVector[i]);                
                i++;
@@ -836,7 +839,7 @@ void pGraphicalFunction :: setColorPoints(std::vector<pColorPoint *> &colorVecto
 void pGraphicalFunction :: getColorPoints(std::vector<pColorPoint *> &colorVector)
 {
        int i = 0;      
-       while(i<f_colorPoints.size())
+       while(i<(int)(f_colorPoints.size()))
        {
                pColorPoint * originaslPoint = f_colorPoints[i];
                pColorPoint * copyPoint = new pColorPoint(originaslPoint->getRealX(), originaslPoint->getColor(), originaslPoint->isTemporalColor());