]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuPlotterView.cxx
3263 creaMaracasVisu Feature New Normal - ViewerNV sync ParallelScale Camera
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuPlotterView.cxx
index 5023801c481565e15186f608aecbce50656dacb4..af7cecc2c73a004e467ead2ee84393bb63bcfb83 100644 (file)
@@ -42,10 +42,7 @@ void PlotterView::Process()
 //     if (firsttime==true)
 //     {
 //             firsttime=false;
-               
-       
-       printf("EED PlotterView::Process %d %d \n ", bbGetInputInY().size(),bbGetInputInY2().size());
-       
+                       
        pGraphicalFunction *pGF = mwxwidget->getFunction(0);
        pGraphicalFunction *pGF2 = mwxwidget->getFunction(1);
 
@@ -110,6 +107,7 @@ void PlotterView::Process()
                } // if bbGetInputInY
                
 //     } // if firsttime
+
        
        if (pGF!=NULL)  
        {
@@ -134,14 +132,18 @@ void PlotterView::Process()
                }               
        }// if pGF
 
-
        if (pGF2!=NULL) 
        {
                // -Erasing  points-
                int i,sizePoints                = pGF2->getSizePoints();
                for (i=0; i<sizePoints;i++)
                {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
                        pGF2->deletePointAt(1);   //  EED here NOT 0 is 1
+#else
+                       pGF2->deletePointAt(0);   //  EED here NOT 0 is 1
+#endif
                } // for i
                // -Add Points-
                double px;
@@ -155,30 +157,23 @@ void PlotterView::Process()
                                px = i;
                        }       
                        pGF2->AddNewPoint( px, bbGetInputInY2()[i] );
-               }               
+               }  // for       
        }// if pGF
-               
        mwxwidget->UpdateAll();
-       
-       
 }
 
        
 //---------------------------------------------------
 void PlotterView::CreateWidget(wxWindow* parent)
 {
-   bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<<std::endl);
-    
-   mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
-   mwxwidget->AddLayer(new pPlotterScaleX());
-   mwxwidget->AddLayer(new pPlotterScaleY());
-
+       bbtkDebugMessageInc("Core",9,"PlotterView::CreateWxWindow()"<<std::endl);
+       mwxwidget = new pPlotterWindow( parent , -1,wxDefaultPosition,  wxDefaultSize,  0 );
+       mwxwidget->AddLayer(new pPlotterScaleX());
+       mwxwidget->AddLayer(new pPlotterScaleY());
        mwxwidget->setMinScrY(0);
        mwxwidget->setMaxScrY(5000);
-
-       
-          bbtkDebugDecTab("Core",9);
-   bbSetOutputWidget( mwxwidget );
+       bbtkDebugDecTab("Core",9);
+       bbSetOutputWidget( mwxwidget );
 }
 
 //---------------------------------------------------