summaryrefslogtreecommitdiff
path: root/indra/llui/lltabcontainer.cpp
diff options
context:
space:
mode:
authorgraham linden <graham@lindenlab.com>2013-03-28 19:16:48 -0700
committergraham linden <graham@lindenlab.com>2013-03-28 19:16:48 -0700
commit14ddfcdf5237c9529d8a8edbd4c86cfd53cfaf78 (patch)
tree60f4de9fcd1b22b8dd504218a870e8abea599a81 /indra/llui/lltabcontainer.cpp
parentd4b3c23da11dd963915d078b169ac9ac0cf7b7bf (diff)
parent130e4e510198147664a2377b62b22d8e42f00f04 (diff)
Merged lindenlab/viewer-development into default
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
-rw-r--r--indra/llui/lltabcontainer.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 0c43a571b8..6f895ed939 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -1483,16 +1483,22 @@ BOOL LLTabContainer::setTab(S32 which)
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
LLTabTuple* tuple = *iter;
- if (!tuple)
- continue;
BOOL is_selected = ( tuple == selected_tuple );
- tuple->mButton->setUseEllipses(mUseTabEllipses);
- tuple->mButton->setHAlign(mFontHalign);
- tuple->mTabPanel->setVisible( is_selected );
-// tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here.
- tuple->mButton->setToggleState( is_selected );
- // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs
- tuple->mButton->setTabStop( is_selected );
+
+ // Although the selected tab must be complete, we may have hollow LLTabTuple tucked in the list
+ if (tuple->mButton)
+ {
+ tuple->mButton->setUseEllipses(mUseTabEllipses);
+ tuple->mButton->setHAlign(mFontHalign);
+ tuple->mButton->setToggleState( is_selected );
+ // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs
+ tuple->mButton->setTabStop( is_selected );
+ }
+ if (tuple->mTabPanel)
+ {
+ tuple->mTabPanel->setVisible( is_selected );
+ //tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here.
+ }
if (is_selected)
{
@@ -1563,8 +1569,7 @@ BOOL LLTabContainer::selectTabByName(const std::string& name)
LLPanel* panel = getPanelByName(name);
if (!panel)
{
- llwarns << "LLTabContainer::selectTabByName("
- << name << ") failed" << llendl;
+ llwarns << "LLTabContainer::selectTabByName(" << name << ") failed" << llendl;
return FALSE;
}