summaryrefslogtreecommitdiff
path: root/indra/llui/llaccordionctrl.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-02 11:09:17 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-02 11:09:17 -0700
commit28d23e8c85ba6073cffbd3597342c43f4f9c7971 (patch)
tree8e817fa78c67ffe686d57f4889016623dfeffab2 /indra/llui/llaccordionctrl.cpp
parentb742f0c2a4cf1355044fbcebdad4346a4871a89b (diff)
parent4835c615d5a00f146bcd5c7a50153418ce2a3613 (diff)
Merge
Diffstat (limited to 'indra/llui/llaccordionctrl.cpp')
-rw-r--r--indra/llui/llaccordionctrl.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 5d1d57cbb2..8e0245c451 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -65,6 +65,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
, mFitParent(params.fit_parent)
, mAutoScrolling( false )
, mAutoScrollRate( 0.f )
+ , mSelectedTab( NULL )
{
mSingleExpansion = params.single_expansion;
if(mFitParent && !mSingleExpansion)
@@ -76,6 +77,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
, mAutoScrolling( false )
, mAutoScrollRate( 0.f )
+ , mSelectedTab( NULL )
{
mSingleExpansion = false;
mFitParent = false;
@@ -689,6 +691,28 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return 0;
}
+ else if(str_action == "select_current")
+ {
+ for(size_t i=0;i<mAccordionTabs.size();++i)
+ {
+ // Set selection to the currently focused tab.
+ if(mAccordionTabs[i]->hasFocus())
+ {
+ if (mAccordionTabs[i] != mSelectedTab)
+ {
+ if (mSelectedTab)
+ {
+ mSelectedTab->setSelected(false);
+ }
+ mSelectedTab = mAccordionTabs[i];
+ mSelectedTab->setSelected(true);
+ }
+
+ return 1;
+ }
+ }
+ return 0;
+ }
}
else if (info.has("scrollToShowRect"))
{