diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-13 16:25:48 +0000 |
commit | 20e56a6925b4d4106059a73a22170beb5a38be1e (patch) | |
tree | 6b9d6dec9f628dfa1ab948cbfb10b86fe4cdc826 /indra/newview/llfavoritesbar.cpp | |
parent | 330e635c2ce2ea0650226f56559cf1068df0320d (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1992 https://svn.aws.productengine.com/secondlife/pe/stable-2@2004 -> viewer-2.0.0-3
* Bugs: EXT-1091 EXT-1418 EXT-996 EXT-1150 EXT-1188 EXT-1417 EXT-1181 EXT-1058 EXT-1397 EXT-836 EXT-1437 EXT-1379
* Dev: EXT-1291 EXT-1255 EXT-992 EXT-96 EXT-1157
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index b06b4855ad..007c6b2c4c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -201,7 +201,7 @@ public: fb->handleHover(x, y, mask); } - return LLMenuItemCallGL::handleHover(x, y, mask); + return TRUE; } void initFavoritesBarPointer(LLFavoritesBarCtrl* fb) { this->fb = fb; } @@ -217,6 +217,35 @@ private: }; /** + * This class was introduced just for fixing the following issue: + * EXT-836 Nav bar: Favorites overflow menu passes left-mouse click through. + * We must explicitly handle drag and drop event by returning TRUE + * because otherwise LLToolDragAndDrop will initiate drag and drop operation + * with the world. + */ +class LLFavoriteLandmarkToggleableMenu : public LLToggleableMenu +{ +public: + virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) + { + *accept = ACCEPT_NO; + return TRUE; + } + +protected: + LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p): + LLToggleableMenu(p) + { + } + + friend class LLUICtrlFactory; +}; + +/** * This class is needed to update an item being copied to the favorites folder * with a sort field value (required to save favorites bar's tabs order). * See method handleNewFavoriteDragAndDrop for more details on how this class is used. @@ -788,7 +817,7 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu_p.max_scrollable_items = 10; menu_p.preferred_width = DROP_DOWN_MENU_WIDTH; - LLToggleableMenu* menu = LLUICtrlFactory::create<LLToggleableMenu>(menu_p); + LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p); mPopupMenuHandle = menu->getHandle(); } |