[vtkusers] Bug in vtkRenderWindowInteractor ?
alican
alican1812 at hotmail.com
Sun Dec 10 07:10:31 EST 2017
I am using the exact code of this example:
https://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidgetWithCustomCallback
<https://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/SeedWidgetWithCustomCallback>
with one exception: instead of creating a new renderer and a new render
window, like in the example:
// A renderer and render window
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
I am using my existing renderer and window.
Now, when a user finishes an interaction, I would like to remove the seed
widget, and stay with my renderer and my render window. So I am doing like
that:
seedWidget->RemoveObserver(vtkCommand::InteractionEvent);
seedWidget->RemoveObserver(vtkCommand::EndInteractionEvent);
seedWidget->Off();
seedWidget = nullptr;
foreach(vtkSmartPointer<vtkHandleWidget> hw, seeds)
hw->Off();
seeds.clear();
iren->Delete();
It looks OK, the widget disappears, but when I quit my program, the process
still stays active and I can see in debugger that it is stuck in
vtkWin32RenderWindowInteractor::StartEventLoop()
Is it a bug in interactor, or am I doing something wrong?
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list