TabDecorator: fix invalidation when removing a tab.

Fixes #12085.

Change-Id: I346e39ba4dc6befe97f33f8ff409a6ac84ae8585
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2609
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Adrien Destugues 2020-05-08 20:59:11 +02:00 committed by waddlesplash
parent 09af7c139b
commit 7362b02b0e
1 changed files with 3 additions and 2 deletions

View File

@ -793,10 +793,11 @@ TabDecorator::_AddTab(DesktopSettings& settings, int32 index,
bool
TabDecorator::_RemoveTab(int32 index, BRegion* updateRegion)
{
BRect oldTitle = fTitleBarRect;
BRect oldRect = TabRect(index) | TabRect(CountTabs() - 1);
// Get a rect of all the tabs to the right - they will all be moved
_DoLayout();
if (updateRegion != NULL) {
updateRegion->Include(oldTitle);
updateRegion->Include(oldRect);
updateRegion->Include(fTitleBarRect);
}
return true;