TabDecorator: Invalidate all tabs when updating a title
Signed-off-by: Adrien Destugues <[email protected]> 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:
committed by
Adrien Destugues
parent
bccd0cd661
commit
0bc1fc98a5
@@ -465,14 +465,16 @@ TabDecorator::_SetTitle(Decorator::Tab* tab, const char* string,
|
|||||||
{
|
{
|
||||||
// TODO: we could be much smarter about the update region
|
// 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();
|
_DoLayout();
|
||||||
|
|
||||||
if (updateRegion == NULL)
|
if (updateRegion == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rect = rect | TabRect(tab);
|
rect = rect | TabRect(CountTabs() - 1);
|
||||||
|
// Update the rect to guarantee it updates all the tabs
|
||||||
|
|
||||||
rect.bottom++;
|
rect.bottom++;
|
||||||
// the border will look differently when the title is adjacent
|
// the border will look differently when the title is adjacent
|
||||||
|
|||||||
Reference in New Issue
Block a user