tgame_load: attempt to fix unit tests

This commit is contained in:
Charles Dang 2016-03-01 04:46:10 +11:00
parent 91f79a956d
commit 56d8b9e365

View file

@ -247,13 +247,15 @@ bool tgame_load::filter_text_changed(ttext_* textbox, const std::string& text)
void tgame_load::post_show(twindow& window)
{
const int index =
find_widget<tlistbox>(&window, "savegame_list", false).get_selected_row();
change_difficulty_ = chk_change_difficulty_->get_widget_value(window);
show_replay_ = chk_show_replay_->get_widget_value(window);
cancel_orders_ = chk_cancel_orders_->get_widget_value(window);
summary_ = games_[index].summary();
if(!games_.empty()) {
const int index =
find_widget<tlistbox>(&window, "savegame_list", false).get_selected_row();
summary_ = games_[index].summary();
}
}
void tgame_load::display_savegame(twindow& window)