fixup! UI: Highlight enemy units in "Show Enemy Moves" mode (#3961)
In the test scenario, highlighting (26,12), pressing Ctrl+V, highlighting (25,12), and pressing Ctrl+V again refreshed highlighting of the Ghost but not of the Elvish Sharpshooter. It was similar with the enemy leaders in the first scenarios of AToTB and AOI. I haven't figured out exactly why, but invalidating the units' hexes like toggleellipse does seems to fix it.
This commit is contained in:
parent
25957e3f63
commit
001f9ebe86
1 changed files with 4 additions and 1 deletions
|
@ -457,6 +457,9 @@ void menu_handler::show_enemy_moves(bool ignore_units, int side_num)
|
|||
|
||||
gui_->highlight_another_reach(path, hex_under_mouse);
|
||||
}
|
||||
|
||||
// Need to recompute ellipses for highlighted enemy units
|
||||
gui_->invalidate(u.get_location());
|
||||
}
|
||||
|
||||
// Find possible unit (no matter whether friend or foe) under the
|
||||
|
@ -962,7 +965,7 @@ void menu_handler::execute_gotos(mouse_handler& mousehandler, int side)
|
|||
void menu_handler::toggle_ellipses()
|
||||
{
|
||||
preferences::set_ellipses(!preferences::ellipses());
|
||||
gui_->invalidate_all();
|
||||
gui_->invalidate_all(); // TODO can fewer tiles be invalidated?
|
||||
}
|
||||
|
||||
void menu_handler::toggle_grid()
|
||||
|
|
Loading…
Add table
Reference in a new issue