Use the new set_row_shown overload.

This commit is contained in:
Mark de Wever 2009-12-20 20:46:43 +00:00
parent 866b6a8844
commit 6395eca2a4
2 changed files with 6 additions and 3 deletions

View file

@ -5,6 +5,7 @@ Version 1.7.10+svn:
* User interface:
* Add a new repeating button widget
* Scrollbar buttons now keep scrolling when kept pressed down
* Optimized the speed of the --new-widgets game load dialog
* Miscellaneous and bugfixes:
* Scrollbar containers now use the button super class
* Allow a gui2 timer delete itself in its callback

View file

@ -151,11 +151,13 @@ bool tgame_load::filter_text_changed(ttext_* textbox, const std::string& text)
return false;
last_words_ = words;
std::vector<bool> show_items(list.get_item_count());
for (unsigned int i = 0; i < list.get_item_count(); i++){
tgrid* row = list.get_row_grid(i);
if (text == ""){
list.set_row_shown(i, true);
show_items[i] = true;
}
else{
tgrid::iterator it = row->begin();
@ -176,10 +178,10 @@ bool tgame_load::filter_text_changed(ttext_* textbox, const std::string& text)
}
}
list.set_row_shown(i
, !found ? twidget::VISIBLE : twidget::INVISIBLE);
show_items[i] = found;
}
}
list.set_row_shown(show_items);
return false;
}