unknown-horizons/unknown-horizons — pull request #2095 by ThePawnBreak (2013-05-04 16:14:07+00:00)
Title: Fix tooltips being shown twice

It seems like the real problem is that the way we handle showing tooltips is flawed. Tooltips are supposed to the hidden by the mouseExited event, but this event doesn't always seem to trigger properly.
Specifically, it doesn't seem to trigger when you move the cursor horizontally or vertically. Moving it diagonally seems to work fine. Also, a problem appears when moving the mouse out of the game window when a tooltip is shown.
The cleanest way to fix this would be to detect whether the cursor is placed on an icon with a tooltip each time we call position_tooltip(), but I don't know how to do this and it possibly would be too slow.

Still, my solution seems to fix issue #1451 just fine, and it could be merged, should we choose not to change the tooltip detection system for now.
Also, there's another attribute called self.tooltip_show which, I think, had the same purpose as self.shown ( which I just added ), but doesn't seem to work. Should I just delete it?