Author: anevilyak Date: 2010-02-21 19:08:38 +0100 (Sun, 21 Feb 2010) New Revision: 35558 Changeset: http://dev.haiku-os.org/changeset/35558/haiku Modified: haiku/trunk/src/kits/interface/TabView.cpp Log: When using layout mode, we need to remove the tab from the layout before updating the selection, otherwise the correct view isn't unhidden in some cases. Modified: haiku/trunk/src/kits/interface/TabView.cpp =================================================================== --- haiku/trunk/src/kits/interface/TabView.cpp 2010-02-21 17:22:34 UTC (rev 35557) +++ haiku/trunk/src/kits/interface/TabView.cpp 2010-02-21 18:08:38 UTC (rev 35558) @@ -1159,6 +1159,9 @@ tab->Deselect(); + if (fContainerView->GetLayout()) + fContainerView->GetLayout()->RemoveItem(index); + if (index <= fSelection && fSelection != 0) fSelection--; @@ -1172,9 +1175,6 @@ else SetFocusTab(fFocus, true); - if (fContainerView->GetLayout()) - fContainerView->GetLayout()->RemoveItem(index); - return tab; }