aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llmenugl.cpp')
-rw-r--r--linden/indra/llui/llmenugl.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp
index b70f98b..e00700a 100644
--- a/linden/indra/llui/llmenugl.cpp
+++ b/linden/indra/llui/llmenugl.cpp
@@ -2582,6 +2582,31 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
2582 return success; 2582 return success;
2583} 2583}
2584 2584
2585// Remove a menu item from this menu.
2586BOOL LLMenuGL::remove( LLMenuItemGL* item )
2587{
2588 if (mSpilloverMenu)
2589 {
2590 cleanupSpilloverBranch();
2591 }
2592
2593 item_list_t::iterator found_iter = std::find(mItems.begin(), mItems.end(), item);
2594 if (found_iter != mItems.end())
2595 {
2596 mItems.erase(found_iter);
2597 }
2598
2599 removeChild( item );
2600
2601 // We keep it around in case someone is pointing at it.
2602 // The caller can delete it if it's safe.
2603 // Note that getMenu() will still not work since its parent isn't a menu.
2604 sMenuContainer->addChild( item );
2605
2606 arrange();
2607 return TRUE;
2608}
2609
2585void LLMenuGL::setEnabledSubMenus(BOOL enable) 2610void LLMenuGL::setEnabledSubMenus(BOOL enable)
2586{ 2611{
2587 setEnabled(enable); 2612 setEnabled(enable);