Fix blink/refresh of the ellipse in the unit-select animation

Remove the scrolling to the newly-selected unit (when partially
off-screen) because it was very disturbing and it slowed user inputs
(+ had a little bug: hex was empty during scrolling)
This commit is contained in:
Ali El Gariani 2007-11-02 13:32:23 +00:00
parent c912ea734a
commit faa6bc5160

View file

@ -426,11 +426,7 @@ void unit_selected(gamemap::location& loc)
unit_map::iterator u = disp->get_units().find(loc);
if(u == disp->get_units().end()) return;
u->second.set_hidden(true);
disp->scroll_to_tile(loc,game_display::ONSCREEN);
disp->draw();
u->second.start_animation(*disp,loc,u->second.choose_animation(*disp,loc,"selected"),true);
u->second.set_hidden(false);
while(!u->second.get_animation()->animation_finished()) {
disp->invalidate(loc);