diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-12-08 11:53:13 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-12-08 11:53:13 +0200 |
commit | ebdbe36f28c27e14f579722df8ba4e0faebca2ac (patch) | |
tree | 75c568cba5ad7a6adf5e4a0fb98919850c7c96f5 /indra | |
parent | 8d82b79ab43264af48c9e46873e1ccecba60ceda (diff) |
STORM-436 FIXED Favorites overflow list appeared if you clicked a favorite landmark context menu item.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfavoritesbar.h | 1 |
2 files changed, 11 insertions, 1 deletions
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; |