diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-14 23:28:19 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-14 23:28:19 +0300 |
commit | b6a39ffa214dea8045a768bcfd83f2e1cab13c9b (patch) | |
tree | c17fb2aa5b897e8945b2fccbd50f685024a27006 /indra/newview | |
parent | 73ba1f288d30777754d13560863e3e4fade2fc6a (diff) |
STORM-155 Fixed attempt to show an invisible sidebar tab.
Reason: when you detach the bottommost sidebar tab, the fake open/close tab gets selected, which is invisible.
Fix: select a normal, visible tab.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsidetray.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 88e37b815f..b0914eee69 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -762,8 +762,15 @@ bool LLSideTray::removeTab(LLSideTrayTab* tab) // Deselect the tab. if (mActiveTab == tab) { - child_vector_iter_t next_tab_it = - (tab_it < (mTabs.end() - 1)) ? tab_it + 1 : mTabs.begin(); + // Select the next tab (or first one, if we're removing the last tab), + // skipping the fake open/close tab (STORM-155). + child_vector_iter_t next_tab_it = tab_it; + do + { + next_tab_it = (next_tab_it < (mTabs.end() - 1)) ? next_tab_it + 1 : mTabs.begin(); + } + while ((*next_tab_it)->getName() == "sidebar_openclose"); + selectTabByName((*next_tab_it)->getName(), true); // Don't hide the tab being removed. } |