diff options
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 90f6438980..1e8a739d78 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -298,6 +298,20 @@ public: return TRUE; } + void setVisible(BOOL b) + { + // Overflow menu shouldn't hide when it still has focus. See EXT-4217. + if (!b && hasFocus()) + return; + LLToggleableMenu::setVisible(b); + setFocus(b); + } + + void onFocusLost() + { + setVisible(FALSE); + } + protected: LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p): LLToggleableMenu(p) @@ -628,8 +642,8 @@ void LLFavoritesBarCtrl::draw() if (mShowDragMarker) { - S32 w = mImageDragIndication->getWidth() / 2; - S32 h = mImageDragIndication->getHeight() / 2; + S32 w = mImageDragIndication->getWidth(); + S32 h = mImageDragIndication->getHeight(); if (mLandingTab) { @@ -777,6 +791,15 @@ void LLFavoritesBarCtrl::updateButtons() mChevronButton->setRect(rect); mChevronButton->setVisible(TRUE); } + // Update overflow menu + LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get()); + if (overflow_menu && overflow_menu->getVisible()) + { + overflow_menu->setFocus(FALSE); + overflow_menu->setVisible(FALSE); + if (mUpdateDropDownItems) + showDropDownMenu(); + } } else { @@ -892,6 +915,8 @@ void LLFavoritesBarCtrl::showDropDownMenu() if (menu) { + // Release focus to allow changing of visibility. + menu->setFocus(FALSE); if (!menu->toggleVisibility()) return; |