Fixed whiteboard crash on delete with multiple moves (bug #1842)
This commit is contained in:
parent
9ff528b6f3
commit
b5641d8e3c
2 changed files with 2 additions and 2 deletions
|
@ -58,6 +58,7 @@ Version 1.13.8+dev:
|
|||
* Miscellaneous and Bug Fixes:
|
||||
* Add --report/-R command line switch for printing the same report from the
|
||||
Game Version dialog's clipboard function to stdout.
|
||||
* Fixed whiteboard crash on delete action with multiple moves (bug #1842)
|
||||
* WFL Engine
|
||||
* Add owner key to terrain space callable, for villages
|
||||
* Location formulas in [tunnel] now have a teleport_unit variable
|
||||
|
|
|
@ -1007,8 +1007,7 @@ void manager::contextual_delete()
|
|||
action_ptr action;
|
||||
side_actions::iterator it = viewer_actions()->end();
|
||||
unit const* selected_unit = future_visible_unit(resources::controller->get_mouse_handler_base().get_selected_hex(), viewer_side());
|
||||
if(selected_unit && (it = viewer_actions()->find_first_action_of(*selected_unit)) != viewer_actions()->end()) {
|
||||
///@todo Shouldn't it be "find_last_action_of" instead of "find_first_action_of" above?
|
||||
if(selected_unit && (it = viewer_actions()->find_last_action_of(*selected_unit)) != viewer_actions()->end()) {
|
||||
viewer_actions()->remove_action(it);
|
||||
///@todo Shouldn't we probably deselect the unit at this point?
|
||||
} else if(highlighter_ && (action = highlighter_->get_delete_target()) && (it = viewer_actions()->get_position_of(action)) != viewer_actions()->end()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue