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 <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
d566b4d9dd
commit
7e42e5b5a4
@ -1243,10 +1243,12 @@ BTabView::RemoveTab(int32 index)
|
||||
else if (index <= fSelection)
|
||||
Select(fSelection - 1);
|
||||
|
||||
if (fFocus == CountTabs() - 1 || CountTabs() == 0)
|
||||
SetFocusTab(fFocus, false);
|
||||
else
|
||||
SetFocusTab(fFocus, true);
|
||||
if (fFocus >= 0) {
|
||||
if (fFocus == CountTabs() - 1 || CountTabs() == 0)
|
||||
SetFocusTab(fFocus, false);
|
||||
else
|
||||
SetFocusTab(fFocus, true);
|
||||
}
|
||||
|
||||
return tab;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user