#14 Pie Chart Popups Gone
Fix #14 (closed) & cleanup the code a bit.
The issue was that leave_notify_event
would get called as soon as the tooltip (containing info about the selected item) would appear. This caused the variable highlighted_item
to be set to null
and hence make the tooltip instantly disappear.
This MR does a few things:
-
remove leave_notify_event
entirely and only sethighlighted_item
when a move event or click event has happened. - Always enable
has_tooltip
- remove return value from
highlight_item_at_point
(since we always havehas_tooltip
enabled)
I'm not sure if this is the best solution, happy to take review comments make changes as long as the code ends up being modernised / simplified.
Best Wishes!