mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-21 18:36:24 +00:00
units_dialog: move item erase from filter (#9839)
moved before `selected_index_` gets changed to -1 due to `list_item_clicked()`
This commit is contained in:
parent
0e2b92e210
commit
e94f577d9a
@ -276,6 +276,8 @@ void units_dialog::dismiss_unit(std::vector<unit_const_ptr>& unit_list, const te
|
||||
|
||||
// Remove the entry from the dialog list
|
||||
list.remove_row(selected_index_);
|
||||
|
||||
// This line can change selected_index_, so the erasing needs to be done before it
|
||||
list_item_clicked();
|
||||
|
||||
assert(filter_options_.size() == list.get_item_count());
|
||||
|
Loading…
x
Reference in New Issue
Block a user