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:
parent
8104997dbb
commit
07c0f45cb9
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue