summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
authorChristian Goetze (CG) <cg@lindenlab.com>2010-09-16 12:03:36 -0700
committerChristian Goetze (CG) <cg@lindenlab.com>2010-09-16 12:03:36 -0700
commitf78547cb4265f324adbe224fd4b17097089c0855 (patch)
treebf2f188a5ac0bd308f45a9fbd46c80c8cd3f9115 /indra/newview/llsidetray.cpp
parent79ea7b43743b8b9ec768ebb3f3212a147bb9f846 (diff)
parent395a5cbafff00aa90e0cd71891f9741c501e9824 (diff)
Merging work to make lenny build
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 88e37b815f..9ee504cc4c 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -568,8 +568,9 @@ void LLSideTray::toggleTabButton(LLSideTrayTab* tab)
{
LLButton* btn = it->second;
bool new_state = !btn->getToggleState();
- btn->setToggleState(new_state);
- btn->setImageOverlay( new_state ? tab->mImageSelected : tab->mImage );
+ btn->setToggleState(new_state);
+ // Only highlight the tab if side tray is expanded (STORM-157).
+ btn->setImageOverlay( new_state && !getCollapsed() ? tab->mImageSelected : tab->mImage );
}
}
@@ -762,8 +763,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.
}