From ebdbe36f28c27e14f579722df8ba4e0faebca2ac Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 8 Dec 2010 11:53:13 +0200 Subject: STORM-436 FIXED Favorites overflow list appeared if you clicked a favorite landmark context menu item. --- indra/newview/llfavoritesbar.cpp | 11 ++++++++++- indra/newview/llfavoritesbar.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 18fb744201..0c0fdd5572 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -376,6 +376,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mLastTab(NULL), mTabsHighlightEnabled(TRUE) , mUpdateDropDownItems(true) +, mRestoreOverflowMenu(false) { // Register callback for menus with current registrar (will be parent panel's registrar) LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Favorites.DoToSelected", @@ -978,6 +979,14 @@ void LLFavoritesBarCtrl::onButtonRightClick( LLUUID item_id,LLView* fav_button,S { return; } + + // Remember that the context menu was shown simultaneously with the overflow menu, + // so that we can restore the overflow menu when user clicks a context menu item + // (which hides the overflow menu). + { + LLView* overflow_menu = mOverflowMenuHandle.get(); + mRestoreOverflowMenu = overflow_menu && overflow_menu->getVisible(); + } // Release mouse capture so hover events go to the popup menu // because this is happening during a mouse down. @@ -1083,7 +1092,7 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) // 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*) mOverflowMenuHandle.get(); - if (menu && !menu->getVisible()) + if (mRestoreOverflowMenu && menu && !menu->getVisible()) { showDropDownMenu(); } diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 234f0bc7de..1a28731c4f 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -98,6 +98,7 @@ protected: const LLFontGL *mFont; S32 mFirstDropDownItem; bool mUpdateDropDownItems; + bool mRestoreOverflowMenu; LLUUID mSelectedItemID; -- cgit v1.2.3