diff options
Diffstat (limited to 'indra/llui/llaccordionctrl.cpp')
-rw-r--r-- | indra/llui/llaccordionctrl.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index cdcf780d2e..136fd2a9ac 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -332,11 +332,31 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view) if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) == getChildList()->end()) addChild(accordion_tab); mAccordionTabs.push_back(accordion_tab); - + accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) ); } +void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) +{ + LLAccordionCtrlTab* accordion_tab = dynamic_cast<LLAccordionCtrlTab*>(view); + if(!accordion_tab) + return; + + if(std::find(getChildList()->begin(),getChildList()->end(),accordion_tab) != getChildList()->end()) + removeChild(accordion_tab); + + for (std::vector<LLAccordionCtrlTab*>::iterator iter = mAccordionTabs.begin(); + iter != mAccordionTabs.end(); ++iter) + { + if (accordion_tab == (*iter)) + { + mAccordionTabs.erase(iter); + break; + } + } +} + void LLAccordionCtrl::arrangeSinge() { S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter |