diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-12-03 17:10:43 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-12-03 17:10:43 +0200 |
commit | f838c5d3ae25e90dba80817f98b50df3e58a4010 (patch) | |
tree | 0c80900206ac15dad0e923264a844ae002d99251 /indra/llui/llmenugl.cpp | |
parent | 3b05656ba1f698535453622267996df14fef3dde (diff) | |
parent | 67f11add9c2e05e1c86e30c44c94ee1b7d9205d0 (diff) |
Merge from default branch.
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index f8935d03ac..907f2352a0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -590,12 +590,13 @@ BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask) LLMenuGL* parent_menu = getMenu(); if (y > getRect().getHeight() / 2) { - LLView* prev_menu_item = parent_menu->findPrevSibling(this); + // the menu items are in the child list in bottom up order + LLView* prev_menu_item = parent_menu->findNextSibling(this); return prev_menu_item ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { - LLView* next_menu_item = parent_menu->findNextSibling(this); + LLView* next_menu_item = parent_menu->findPrevSibling(this); return next_menu_item ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE; } } @@ -605,12 +606,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask) LLMenuGL* parent_menu = getMenu(); if (y > getRect().getHeight() / 2) { - LLView* prev_menu_item = parent_menu->findPrevSibling(this); + LLView* prev_menu_item = parent_menu->findNextSibling(this); return prev_menu_item ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { - LLView* next_menu_item = parent_menu->findNextSibling(this); + LLView* next_menu_item = parent_menu->findPrevSibling(this); return next_menu_item ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE; } } |