TabDecorator: Invalidate all tabs when updating a title

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes #8569

I'm not sure if this works properly if you reorder tabs (see #9175). But
the fix for that is reordering the tab list to match the visible order,
which doesn't affect this part of the code.
This commit is contained in:
Puck Meerburg 2015-01-16 18:30:29 +01:00 committed by Adrien Destugues
parent bccd0cd661
commit 0bc1fc98a5

View File

@ -465,14 +465,16 @@ TabDecorator::_SetTitle(Decorator::Tab* tab, const char* string,
{
// TODO: we could be much smarter about the update region
BRect rect = TabRect(tab);
BRect rect = TabRect((int32) 0) | TabRect(CountTabs() - 1);
// Get a rect of all the tabs
_DoLayout();
if (updateRegion == NULL)
return;
rect = rect | TabRect(tab);
rect = rect | TabRect(CountTabs() - 1);
// Update the rect to guarantee it updates all the tabs
rect.bottom++;
// the border will look differently when the title is adjacent