summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollingpanellist.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-14 21:50:02 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-14 21:50:02 +0000
commit73caee4208a4e05f66583de099502012fd8415ea (patch)
treeff9fa1b7b010e71fb62f26a32c912b5e266f3b23 /indra/llui/llscrollingpanellist.cpp
parent1db494f58ad378b8028c1f071196be82af5fe964 (diff)
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
Diffstat (limited to 'indra/llui/llscrollingpanellist.cpp')
-rw-r--r--indra/llui/llscrollingpanellist.cpp23
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() )