diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-08 09:50:04 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-08 09:50:04 -0500 |
commit | 5dda2516ad599d3c295930fb3fc0c6cdbe8c2ce5 (patch) | |
tree | 06d761559a50b8df3db4dffa32c6ad28ce398c11 /indra/newview/llfavoritesbar.cpp | |
parent | f5b82a377256d5806ec101e8a9d90533ea1a3bf9 (diff) | |
parent | bb977a194f42cafdcf3f1245adf3b7f49857e552 (diff) |
merge
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; |