mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 01:28:29 +00:00
widgets/menu: Don't draw during layout
This commit is contained in:
parent
bb05eee11e
commit
caa8619898
@ -979,16 +979,13 @@ void menu::layout()
|
|||||||
|
|
||||||
for(std::set<int>::const_iterator i = invalid_.begin(); i != invalid_.end(); ++i) {
|
for(std::set<int>::const_iterator i = invalid_.begin(); i != invalid_.end(); ++i) {
|
||||||
if(*i == -1) {
|
if(*i == -1) {
|
||||||
|
// TODO: draw_manager - is this ever actually used?
|
||||||
SDL_Rect heading_rect = inner_location();
|
SDL_Rect heading_rect = inner_location();
|
||||||
heading_rect.h = heading_height();
|
heading_rect.h = heading_height();
|
||||||
bg_restore(heading_rect);
|
queue_redraw(heading_rect);
|
||||||
style_->draw_row(*this,0,heading_rect,HEADING_ROW);
|
|
||||||
} else if(*i >= 0 && *i < int(item_pos_.size())) {
|
} else if(*i >= 0 && *i < int(item_pos_.size())) {
|
||||||
const unsigned int pos = item_pos_[*i];
|
|
||||||
const SDL_Rect& rect = get_item_rect(*i);
|
const SDL_Rect& rect = get_item_rect(*i);
|
||||||
queue_redraw(rect);
|
queue_redraw(rect);
|
||||||
style_->draw_row(*this,pos,rect,
|
|
||||||
(!out_ && pos == selected_) ? SELECTED_ROW : NORMAL_ROW);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user