From 73caee4208a4e05f66583de099502012fd8415ea Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 14 Aug 2009 21:50:02 +0000 Subject: svn merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1331 https://svn.aws.productengine.com/secondlife/pe/stable-1@1340 -> viewer-2.0.0-3 EXT-269 EXT-274 EXT-276 EXT-277 EXT-282 EXT-296 EXT-342 EXT-370 EXT-379 EXT-394 EXT-398 EXT-405 EXT-407 EXT-410 EXT-413 EXT-414 EXT-450 EXT-456 EXT-477 EXT-482 EXT-496 --- indra/llui/llscrollingpanellist.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'indra/llui/llscrollingpanellist.cpp') 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() ) -- cgit v1.2.3