Don't leave a hex selected when using 't' to continue a move

Fixes the minor part of issue #6292, that functionality showing the path
to a selected hex was active after continuing an interrupted move. That
feature is completely separate to the main bug of #6292, but it looks
confusingly similar in testing. The intended way to activate this feature is
via the "Select Hex" hotkey, which doesn't have any keybinding by default, so
should only be reachable by people who want the feature.

It would be good to refactor the movement handling so that it's not split
between mouse-handling and menu-handling files, but it would also need a lot of
work and would be out-of-scope for backporting to 1.16.

(cherry picked from commit 8351fec2ae)
This commit is contained in:
Steve Cotton 2021-12-28 16:02:45 +01:00 committed by Steve Cotton
parent 978229c247
commit e26a15cec2

View file

@ -894,6 +894,7 @@ void menu_handler::move_unit_to_loc(const unit_map::iterator& ui,
actions::move_unit_and_record(route.steps, &pc_.get_undo_stack(), continue_move);
}
mousehandler.deselect_hex();
gui_->set_route(nullptr);
gui_->invalidate_game_status();
}