diff options
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 6ec0719ad5..7aaa306f05 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -385,11 +385,7 @@ void LLMenuItemGL::doIt( void ) { // close all open menus by default // if parent menu is actually visible (and we are not triggering menu item via accelerator) - // HACK: do not call hidemenus() from a pie menu item, as most pie menu operations - // assume that the thing you clicked on stays selected (parcel and/or object) after the - // pie menu is gone --RN - if (getMenu()->getWidgetType() != WIDGET_TYPE_PIE_MENU - && !getMenu()->getTornOff() + if (!getMenu()->getTornOff() && getMenu()->getVisible()) { LLMenuGL::sMenuContainer->hideMenus(); @@ -3283,7 +3279,7 @@ void LLPieMenuBranch::doIt( void ) S32 center_y; parent->localPointToScreen(rect.getWidth() / 2, rect.getHeight() / 2, ¢er_x, ¢er_y); - parent->hide(TRUE); + parent->hide(FALSE); mBranch->show( center_x, center_y, FALSE ); } @@ -3473,6 +3469,11 @@ BOOL LLPieMenu::handleMouseDown( S32 x, S32 y, MASK mask ) // to make sure it's within the item's rectangle handled = item->handleMouseDown( 0, 0, mask ); } + else if (!mRightMouseDown) + { + // call hidemenus to make sure transient selections get cleared + ((LLMenuHolderGL*)getParent())->hideMenus(); + } // always handle mouse down as mouse up will close open menus return handled; @@ -3546,6 +3547,11 @@ BOOL LLPieMenu::handleMouseUp( S32 x, S32 y, MASK mask ) hide(TRUE); } } + else if (!mRightMouseDown) + { + // call hidemenus to make sure transient selections get cleared + ((LLMenuHolderGL*)getParent())->hideMenus(); + } if (handled) { |