When reproducing the bug described in #708, using the same graph, sometimes the rectangle center is selected instead of the transform gizmo, although it is not visible.
Looking at the code in ViewerTab20.cpp, it seems like the overlay actions are executed in the wrong order:
- the draw actions should be executed from back to front -> these are OK
- all other actions (penUp, penMotion, penDown, etc) should be executed from front to back -> some are executed from back to front, including penDown, and the use of ViewerTabPrivate::lastOverlayNode seems to be a poor way to circumvent this bug