<div dir="ltr">Hi Gary,<div><br></div><div>I downloaded your program and confirmed your findings: if the timer</div><div>is running, then the trackball-mode rotation does not stop when the</div><div>mouse stops.<br><div class="gmail_extra"><br></div><div class="gmail_extra">This definitely looks like a bug in VTK itself, so I don't think there</div><div class="gmail_extra">is any way for you to fix it inside your program.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Can you report it on the VTK bugtracker? (<a href="http://www.vtk.org/Bug">http://www.vtk.org/Bug</a>)</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 21, 2016 at 8:29 AM, gary_jia <span dir="ltr"><<a href="mailto:jialei.gary@gmail.com" target="_blank">jialei.gary@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi everyone,<br>
    When I use the vtkInteractorStyleTrackballCamera, the object movement<br>
will stop when the mouse freezes ( with mouse button still down). After I<br>
added a timer, the object keep moving even when the mouse stop moving. Only<br>
after I release the mouse button, the movement stops.<br>
   Could you help to tell me how to stop the movement immediately after the<br>
mouse stop even with any mouse button still down when with a timer running?<br>
<br>
Thank you!<br>
<br>
  my code:<br>
<br>
#!/usr/bin/env python<br>
import vtk<br>
<br>
class vtkTimerCallback():<br>
    def __init__(self):<br>
        self.timer_count = 0<br>
<br>
    def execute(self,obj,event):<br>
        print(self.timer_count)<br>
        self.timer_count += 1<br>
<br>
src = vtk.vtkCubeSource()<br>
<br>
mapper = vtk.vtkPolyDataMapper()<br>
mapper.SetInputConnection(src.GetOutputPort())<br>
<br>
actor = vtk.vtkActor()<br>
actor.SetMapper(mapper)<br>
<br>
main_render = vtk.vtkRenderer()<br>
main_render.AddActor(actor)<br>
<br>
renWin = vtk.vtkRenderWindow()<br>
renWin.AddRenderer(main_render)<br>
<br>
iren = vtk.vtkRenderWindowInteractor()<br>
iren.SetRenderWindow(renWin)<br>
iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())<br>
iren.Initialize()<br>
<br>
cb = vtkTimerCallback()<br>
cb.actor = actor<br>
iren.AddObserver('TimerEvent', cb.execute)<br>
timerId = iren.CreateRepeatingTimer(50);<br>
iren.Start()<br></blockquote></div></div></div></div>