Activate new level sorting when opening recall dialog.
This actually only show the little arrow (which now indicates how it is sorted) because there is old ugly code already directly sorting the recall list itself, (but only when opening the dialog, which is probably bad for MP/OoS)
This commit is contained in:
parent
6f84e7a8bc
commit
7efe4ce50d
1 changed files with 7 additions and 1 deletions
|
@ -823,6 +823,8 @@ void menu_handler::recall(int side_num, const map_location &last_hex)
|
|||
|
||||
//sort the available units into order by value
|
||||
//so that the most valuable units are shown first
|
||||
//FIXME: this is bad! The dialog directly sort the recall list itself.
|
||||
//and is now useless because level's column sorting is used later
|
||||
sort_units(recall_list_team);
|
||||
|
||||
gui_->draw(); //clear the old menu
|
||||
|
@ -846,7 +848,8 @@ void menu_handler::recall(int side_num, const map_location &last_hex)
|
|||
#endif
|
||||
|
||||
gui::menu::basic_sorter sorter;
|
||||
sorter.set_alpha_sort(1).set_alpha_sort(2).set_id_sort(3).set_xp_sort(4).set_alpha_sort(5);
|
||||
sorter.set_alpha_sort(1).set_alpha_sort(2);
|
||||
sorter.set_level_sort(3,4).set_xp_sort(4).set_alpha_sort(5);
|
||||
|
||||
options.push_back(heading.str());
|
||||
options_to_filter.push_back(options.back());
|
||||
|
@ -923,6 +926,9 @@ void menu_handler::recall(int side_num, const map_location &last_hex)
|
|||
dialogs::units_list_preview_pane unit_preview(recall_list_team, filter);
|
||||
rmenu.add_pane(&unit_preview);
|
||||
|
||||
//sort by level
|
||||
rmenu.get_menu().sort_by(3);
|
||||
|
||||
res = rmenu.show();
|
||||
res = filter->get_index(res);
|
||||
if (res < 0) return;
|
||||
|
|
Loading…
Add table
Reference in a new issue