From 8f205ee1b546766ae718de0ef3fccdb98f983384 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Fri, 17 Jan 2025 16:06:00 +0100 Subject: [PATCH] Test code --- .../wxWindows/widgets/wxVtkBaseView.cxx | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 937212d..3bdaa13 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -85,39 +85,47 @@ void wxVtkBaseView::Configure() // virtual void wxVtkBaseView::Refresh() // virtual { printf("EED wxVtkBaseView::Refresh \n"); -// EED 10 Oct 2007 - #if defined(WIN32) - _iren->Refresh(true); -// EED 27 sept 2016 - vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); - vri->vtkRenderWindowInteractor::Render(); - #else -//EED 01Avril2009 -// _iren->Render(); - vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); - -//auto start1 = std::chrono::high_resolution_clock::now(); - - vri->vtkRenderWindowInteractor::Render(); -//auto stop1 = std::chrono::high_resolution_clock::now(); -//auto duration1 = std::chrono::duration_cast(stop1 - start1); -//printf("EED wxVtkBaseView::Refresh time= %ld %p direction=%d \n", duration1.count() , vri , GetDirection() ); - - //_iren->Refresh(); - #endif + if (firstTimeOnPaint==true) + { + + // EED 10 Oct 2007 +#if defined(WIN32) + _iren->Refresh(true); + // EED 27 sept 2016 + vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); + vri->vtkRenderWindowInteractor::Render(); +#else + //EED 01Avril2009 + // _iren->Render(); + vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); + + //auto start1 = std::chrono::high_resolution_clock::now(); + + vri->vtkRenderWindowInteractor::Render(); + + //auto stop1 = std::chrono::high_resolution_clock::now(); + //auto duration1 = std::chrono::duration_cast(stop1 - start1); + //printf("EED wxVtkBaseView::Refresh time= %ld %p direction=%d \n", duration1.count() , vri , GetDirection() ); + + //_iren->Refresh(); +#endif + } // if firstTimeOnPaint } //------------------------------------------------------------------- void wxVtkBaseView::RefreshView() // virtual { - printf("EED wxVtkBaseView::RefreshView \n"); -// EED 10 Oct 2007 - #if defined(WIN32) - GetRenWin()->Render(); - #else - //GetRenWin()->Render(); - #endif + if (firstTimeOnPaint==true) + { + printf("EED wxVtkBaseView::RefreshView \n"); + // EED 10 Oct 2007 +#if defined(WIN32) + GetRenWin()->Render(); +#else + //GetRenWin()->Render(); +#endif + } // if firstTimeOnPaint } //--------------------------------------------------------------------------- -- 2.49.0