robynsb / interactive-track-and-trace

BSD 2-Clause "Simplified" License
0 stars 3 forks source link

mousemove blocks timer #28

Open djairoh opened 6 months ago

djairoh commented 6 months ago

This appears to be a linux only issue; Robin's macbook does not dislplay this behaviour.

When the simulation is running - that is, the timer is increasing - interacting with the window by mouse seems to block the TimerCallback from being updated. This appears to be on the vtk level, as the execute function of the TimerCallback is simply not invoked while the mouse is being dragged.

This problem can be further tracked to the execute function of SPawnPointCallback, where calling the points->Modified() and renderWindow->Render() are the main culprits.

Commenting out these lines resumes expected behaviour from the timer, but leads to newly spawned points not being rendered if they are created while the timer is paused.

This leads to two possible behaviours, depending on what is more important to the application:

Because both options may be preferred, no fix for this issue will be implemented. Default behaviour will be pausing the simulation. If this needs to be changed, see the appropriate FIXME comment in 'SpawnPointCallback.h'

robynsb commented 5 months ago

djairo found a solution to this, requires embedding the vtk application in a QT program.