Skip to content

Commit

Permalink
GUI2/Styled Widget: fixed most tooltips not showing (fixes #1998)
Browse files Browse the repository at this point in the history
After my initialization refactor, set_tooltip (and the important part, set_wants_mouse_hover)
was no longer called for tooltips provided by WML.
  • Loading branch information
Vultraz committed Sep 14, 2017
1 parent f444ee8 commit 6a169dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/widgets/styled_widget.cpp
Expand Up @@ -62,6 +62,10 @@ styled_widget::styled_widget(const implementation::builder_styled_widget& builde
{
definition_load_configuration(control_type);

// Enable hover behavior if a tooltip was provided.
// TODO: maybe don't duplicate this call with set_tooltip?
set_wants_mouse_hover(!tooltip_.empty());

connect_signal<event::SHOW_TOOLTIP>(std::bind(
&styled_widget::signal_handler_show_tooltip, this, _2, _3, _5));

Expand Down

0 comments on commit 6a169dc

Please sign in to comment.