Skip to content

Commit

Permalink
Ensure that GUI1 widgets are drawn on a DRAW_ALL_EVENT
Browse files Browse the repository at this point in the history
The DRAW_ALL_EVENT is only used in certain circumstances, when a full
redraw of all widgets/components is desired. The previous behaviour
relied on a DRAW-event following the DRAW_ALL_EVENT, which is not
something that can be relied upon. By calling draw() explicitly it
removes the reliance on the DRAW-event.
  • Loading branch information
aginor committed Feb 22, 2016
1 parent b8f1891 commit 7565ae0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widgets/widget.cpp
Expand Up @@ -345,6 +345,7 @@ void widget::process_tooltip_string(int mousex, int mousey)
void widget::handle_event(SDL_Event const &event) {
if (event.type == DRAW_ALL_EVENT) {
set_dirty();
draw();
}
}

Expand Down

0 comments on commit 7565ae0

Please sign in to comment.