Fix bug#9209 (Tooltip blinks annoyingly)

Now removing an inactive tooltip don't kill the current active
tooltip, (except, of course, if you remove the current one)
This commit is contained in:
Ali El Gariani 2007-05-31 01:14:24 +00:00
parent 8104997dbb
commit 07c0f45cb9

View file

@ -134,9 +134,11 @@ void clear_tooltips(const SDL_Rect& rect)
{
for(std::vector<tooltip>::iterator i = tips.begin(); i != tips.end(); ) {
if(rectangles_overlap(i->rect,rect)) {
if (i==current_tooltip) {
clear_tooltip();
}
i = tips.erase(i);
current_tooltip = tips.end();
clear_tooltip();
} else {
++i;
}