Do not force the keyboard focus if there wasn't one
Removing tabs tries to preserve the keyboard focus, but it should also preserve the absence of it. Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
d566b4d9dd
commit
7e42e5b5a4
@@ -1243,10 +1243,12 @@ BTabView::RemoveTab(int32 index)
|
|||||||
else if (index <= fSelection)
|
else if (index <= fSelection)
|
||||||
Select(fSelection - 1);
|
Select(fSelection - 1);
|
||||||
|
|
||||||
|
if (fFocus >= 0) {
|
||||||
if (fFocus == CountTabs() - 1 || CountTabs() == 0)
|
if (fFocus == CountTabs() - 1 || CountTabs() == 0)
|
||||||
SetFocusTab(fFocus, false);
|
SetFocusTab(fFocus, false);
|
||||||
else
|
else
|
||||||
SetFocusTab(fFocus, true);
|
SetFocusTab(fFocus, true);
|
||||||
|
}
|
||||||
|
|
||||||
return tab;
|
return tab;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user