diff options
Diffstat (limited to 'linden/indra/llui/llmenugl.cpp')
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 5d2a052..8ec5656 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -2495,6 +2495,9 @@ void LLMenuGL::cleanupSpilloverBranch() | |||
2495 | mItems.erase(found_iter); | 2495 | mItems.erase(found_iter); |
2496 | } | 2496 | } |
2497 | 2497 | ||
2498 | delete mSpilloverBranch; | ||
2499 | mSpilloverBranch = NULL; | ||
2500 | |||
2498 | // pop off spillover items | 2501 | // pop off spillover items |
2499 | while (mSpilloverMenu->getItemCount()) | 2502 | while (mSpilloverMenu->getItemCount()) |
2500 | { | 2503 | { |
@@ -2607,6 +2610,8 @@ void LLMenuGL::createJumpKeys() | |||
2607 | // remove all items on the menu | 2610 | // remove all items on the menu |
2608 | void LLMenuGL::empty( void ) | 2611 | void LLMenuGL::empty( void ) |
2609 | { | 2612 | { |
2613 | cleanupSpilloverBranch(); | ||
2614 | |||
2610 | mItems.clear(); | 2615 | mItems.clear(); |
2611 | 2616 | ||
2612 | deleteAllChildren(); | 2617 | deleteAllChildren(); |
@@ -4245,11 +4250,14 @@ void LLMenuBarGL::arrange( void ) | |||
4245 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | 4250 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) |
4246 | { | 4251 | { |
4247 | LLMenuItemGL* item = *item_iter; | 4252 | LLMenuItemGL* item = *item_iter; |
4248 | rect.mLeft = pos; | 4253 | if (item->getVisible()) |
4249 | pos += item->getNominalWidth(); | 4254 | { |
4250 | rect.mRight = pos; | 4255 | rect.mLeft = pos; |
4251 | item->setRect( rect ); | 4256 | pos += item->getNominalWidth(); |
4252 | item->buildDrawLabel(); | 4257 | rect.mRight = pos; |
4258 | item->setRect( rect ); | ||
4259 | item->buildDrawLabel(); | ||
4260 | } | ||
4253 | } | 4261 | } |
4254 | reshape(rect.mRight, rect.getHeight()); | 4262 | reshape(rect.mRight, rect.getHeight()); |
4255 | } | 4263 | } |