Display: restrict render clip rect setter to map drawing scope only

This prevents tooltips from being cut off.
This commit is contained in:
Charles Dang 2017-06-27 14:23:20 +11:00
parent f25a404f37
commit 085bd42974

View file

@ -3163,12 +3163,14 @@ void display::draw_new()
draw_all_panels();
draw_minimap();
SDL_Rect map_area_rect = map_area();
render_clip_rect_setter setter(&map_area_rect);
{
SDL_Rect map_area_rect = map_area();
render_clip_rect_setter setter(&map_area_rect);
// Draw the gamemap and its contents (units, etc);
for(const map_location& loc : get_visible_hexes()) {
draw_hex(loc);
// Draw the gamemap and its contents (units, etc);
for(const map_location& loc : get_visible_hexes()) {
draw_hex(loc);
}
}
post_commit();