X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FWidgetShowNPoints.cxx;h=2953844359ef8ae225d078ba9985b0fb0083e5c4;hb=547be998e10b62d3b548146513607c227a9829cd;hp=b9f838613aa9859363c6c55b850fa51caee9b8b2;hpb=132c3c066a857fbd0c3338d405b2bbc28d407ffc;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index b9f8386..2953844 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -215,6 +215,13 @@ void WidgetShowNPoints::RefreshPoint(int id) lstActorsSphere[id]->GetProperty()->SetOpacity( mopacity ); lstSourceSphere[id]->SetRadius( radio ); +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + // .. +#else + lstSourceSphere[id]->Update(); +#endif + lstActorsText[id]->SetInput( label.c_str() ); lstActorsText[id]->SetPosition( radio+spc[0]*x , spc[1]*y , spc[2]*z ); } @@ -241,7 +248,15 @@ void WidgetShowNPoints::AddVtkPoint() //NTU: For updating points lstSourceSphere.push_back(vtksphere); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 sphereMapper->SetInput( vtksphere->GetOutput() ); +#else + vtksphere->Update(); + sphereMapper->SetInputData( vtksphere->GetOutput() ); +#endif + vtkActor *sphereActor = vtkActor::New(); sphereActor->SetMapper(sphereMapper); sphereActor->SetOrigin(0, 0, 0); @@ -346,6 +361,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT //------------------------------------------------------------------------ void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event) { + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 wxFileDialog* FD = new wxFileDialog( 0, _T("Save points .."), _T(""), @@ -353,7 +371,17 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT _T("(*.xls)|*.xls"), wxSAVE | wxOVERWRITE_PROMPT, wxDefaultPosition); - //EED +#else + wxFileDialog* FD = new wxFileDialog( 0, + _T("Save points .."), + _T(""), + _T(""), + _T("(*.xls)|*.xls"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition); +#endif + + int result_FD = FD->ShowModal(); @@ -371,6 +399,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT //------------------------------------------------------------------------ void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event) { + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 wxFileDialog* FD = new wxFileDialog( 0, _T("Load points .."), _T(""), @@ -378,6 +409,15 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT _T("(*.xls)|*.xls"), wxOPEN | wxFILE_MUST_EXIST, wxDefaultPosition); +#else + wxFileDialog* FD = new wxFileDialog( 0, + _T("Load points .."), + _T(""), + _T(""), + _T("(*.xls)|*.xls"), + wxFD_OPEN | wxFD_FILE_MUST_EXIST, + wxDefaultPosition); +#endif int i; //EED int result_FD = FD->ShowModal();