* BTabView::AddTab(): Call Select() only when already attached to the window.

It's only necessary in this case and apparently there are applications that
  rely on Select() not being called before the tab is attached to the window.
  Fixes #3852.
* Automatic white-space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30558 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-05-02 10:24:06 +00:00
parent d65905e3b8
commit bfb8f4ca06
+3 -2
View File
@@ -1134,8 +1134,9 @@ BTabView::AddTab(BView *target, BTab *tab)
fTabList->AddItem(tab); fTabList->AddItem(tab);
// When we don't have a any tabs yet, select this one. // When we haven't had a any tabs before, but are already attached to the
if (CountTabs() == 1) // window, select this one.
if (CountTabs() == 1 && Window() != NULL)
Select(0); Select(0);
} }