diff options
Diffstat (limited to 'indra/llui/llscrollingpanellist.cpp')
-rw-r--r-- | indra/llui/llscrollingpanellist.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index 0159cdd12c..13fbe1d576 100644 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -55,8 +55,6 @@ void LLScrollingPanelList::addPanel( LLScrollingPanel* panel ) addChildInBack( panel ); mPanelList.push_front( panel ); - const S32 GAP_BETWEEN_PANELS = 6; - // Resize this view S32 total_height = 0; S32 max_width = 0; @@ -83,6 +81,27 @@ void LLScrollingPanelList::addPanel( LLScrollingPanel* panel ) } } +void LLScrollingPanelList::removePanel(LLScrollingPanel* panel) +{ + U32 index = 0; + LLScrollingPanelList::panel_list_t::const_iterator iter; + + if (!mPanelList.empty()) + { + for (iter = mPanelList.begin(); iter != mPanelList.end(); ++iter, ++index) + { + if (*iter == panel) + { + break; + } + } + if(iter != mPanelList.end()) + { + removePanel(index); + } + } +} + void LLScrollingPanelList::removePanel( U32 panel_index ) { if ( mPanelList.empty() || panel_index >= mPanelList.size() ) |