diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-01-07 16:20:27 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-01-07 16:20:27 -0500 |
commit | 6abd41831a4cae5d757aa44675731d1fd48d64b1 (patch) | |
tree | 6fc9de74e865a8337823b317a87b7c132bca0c7a /indra/newview/llinspectobject.cpp | |
parent | bb04795eeb222e5396e24e79ac1f77b155bd4622 (diff) | |
parent | 6b8ed2ae6f92d6f9559cbc86699b9ca3197f2e81 (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r-- | indra/newview/llinspectobject.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb35a287e9..dd313c528d 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -41,6 +41,7 @@ #include "llslurl.h" #include "llviewermenu.h" // handle_object_touch(), handle_buy() #include "llviewermedia.h" +#include "llviewermediafocus.h" #include "llviewerobjectlist.h" // to select the requested object // Linden libraries @@ -82,6 +83,10 @@ public: // Release the selection and do other cleanup /*virtual*/ void onClose(bool app_quitting); + // override the inspector mouse leave so timer is only paused if + // gear menu is not open + /* virtual */ void onMouseLeave(S32 x, S32 y, MASK mask); + private: // Refresh displayed data with information from selection manager void update(); @@ -181,7 +186,6 @@ BOOL LLInspectObject::postBuild(void) return TRUE; } - // Multiple calls to showInstance("inspect_avatar", foo) will provide different // LLSD for foo, which we will catch here. //virtual @@ -214,6 +218,10 @@ void LLInspectObject::onOpen(const LLSD& data) LLViewerObject* obj = gObjectList.findObject( mObjectID ); if (obj) { + // Media focus and this code fight over the select manager. + // Make sure any media is unfocused before changing the selection here. + LLViewerMediaFocus::getInstance()->clearFocus(); + LLSelectMgr::instance().deselectAll(); mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj); @@ -562,6 +570,16 @@ void LLInspectObject::updateSecureBrowsing() getChild<LLUICtrl>("secure_browsing")->setVisible(is_secure_browsing); } +// For the object inspector, only unpause the fade timer +// if the gear menu is not open +void LLInspectObject::onMouseLeave(S32 x, S32 y, MASK mask) +{ + LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu(); + if ( !(gear_menu && gear_menu->getVisible())) + { + mOpenTimer.unpause(); + } +} void LLInspectObject::onClickBuy() { |