ImageEngine/gaffer — pull request #692 by johnhaddon (2013-12-13 16:34:54+00:00)
Title: Overlay mouse position fixes

This fixes two bugs where an incorrect mouse position was calculated for overlay Widgets in a GLWidget. The problem is that the mapFromGlobal() method Qt provides doesn't work properly when a Widget is in a QGraphicsView as is used for overlays. The fix means using Widget.bound() to calculate a relative position, because we've already spent ages making Widget.bound() work with all Qt's foibles, which differ on both OS X and Linux.

I've tested this only on OS X. I'm not anticipating problems because it uses code which is already tested on both platforms, but it'd be worth running the test cases for the first fix and taking some time to verify the second one manually on Linux.