AddTab(): Explicitly select the first-added tab. Fixes the problem that the page
wouldn't be made visible, when the tabs were added after the tab view had been attached to the window. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
705a97b615
commit
6217e77c65
@ -1128,11 +1128,15 @@ BTabView::AddTab(BView *target, BTab *tab)
|
||||
tab = new BTab(target);
|
||||
else
|
||||
tab->SetView(target);
|
||||
|
||||
|
||||
if (fContainerView->GetLayout())
|
||||
fContainerView->GetLayout()->AddView(CountTabs(), target);
|
||||
|
||||
fTabList->AddItem(tab);
|
||||
|
||||
// When we don't have a any tabs yet, select this one.
|
||||
if (CountTabs() == 1)
|
||||
Select(0);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user