diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-09-27 22:32:01 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-09-27 22:32:01 +0300 |
commit | 49ae085d4c02045a70eeed3d8cd57c22d2594c0c (patch) | |
tree | 22c01d4e676d16345978796530a20301716ac562 /indra | |
parent | e6688f993f82d2683e3eadce96c893959c94be2d (diff) |
STORM-207 FIXED Favorites overflow menu didn't close when you press ESC.
Caused by the fix of EXT-4217 which I had to revert.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index dd1f92a25c..3981b887ad 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -290,20 +290,6 @@ 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) @@ -790,7 +776,6 @@ void LLFavoritesBarCtrl::updateButtons() 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(); @@ -911,8 +896,6 @@ void LLFavoritesBarCtrl::showDropDownMenu() if (menu) { - // Release focus to allow changing of visibility. - menu->setFocus(FALSE); if (!menu->toggleVisibility()) return; @@ -1093,6 +1076,14 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) { gInventory.removeItem(mSelectedItemID); } + + // Pop-up the overflow menu again (it gets hidden whenever the user clicks a context menu item). + // See EXT-4217 and STORM-207. + LLToggleableMenu* menu = (LLToggleableMenu*) mPopupMenuHandle.get(); + if (menu && !menu->getVisible()) + { + showDropDownMenu(); + } } BOOL LLFavoritesBarCtrl::isClipboardPasteable() const |