Skip to content

Commit

Permalink
COMP: Update ctkVTKAbstractViewTest1 to fix build against VTK 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Apr 13, 2023
1 parent 76126da commit c3b8373
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "ctkVTKWidgetsUtils.h"

// VTK includes
#include <vtkNew.h>
#include <vtkRenderWindow.h>
#include <vtkCallbackCommand.h>

Expand Down Expand Up @@ -112,7 +113,7 @@ int ctkVTKAbstractViewTest1(int argc, char * argv [] )

vtkNew<vtkCallbackCommand> renderEventCallback;
renderEventCallback->SetCallback(onRenderEvent);
sliceView.renderWindow()->AddObserver(vtkCommand::RenderEvent, renderEventCallback);
sliceView.renderWindow()->AddObserver(vtkCommand::RenderEvent, renderEventCallback.GetPointer());
sliceView.setMaximumUpdateRate(VTK_DOUBLE_MAX);
sliceView.show();

Expand All @@ -123,7 +124,7 @@ int ctkVTKAbstractViewTest1(int argc, char * argv [] )
// We expect that the rendering has been triggered at least once
CHECK_BOOL(RenderCount == 0, false);

bool sliceViewWasPaused = sliceView.pauseRender();
sliceView.pauseRender();
RenderCount = 0;
sliceView.scheduleRender();
sleep_ms(100);
Expand Down

0 comments on commit c3b8373

Please sign in to comment.