From 0b0372a3037b9fa1f411180232644b6c9f373319 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 5 Jan 2010 15:49:22 -0800 Subject: EXT-3900 [BSI] Inspector floater fades while inspectors context menu is still active reviewed by Richard --- indra/newview/llinspectobject.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinspectobject.cpp') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb35a287e9..3be9d5fb0e 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -82,6 +82,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 +185,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 @@ -562,6 +565,16 @@ void LLInspectObject::updateSecureBrowsing() getChild("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("gear_btn")->getMenu(); + if ( !(gear_menu && gear_menu->getVisible())) + { + mOpenTimer.unpause(); + } +} void LLInspectObject::onClickBuy() { -- cgit v1.2.3 From 7586d8fcfde811cb04fb1c95aa0aa235b8df6aff Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 6 Jan 2010 12:01:39 -0800 Subject: fix for EXT-2903 ([BSI] Activating inspector while "Zoomed into Media" results in broken inspector) Media Focus and the inspector were fighting over the object selection. Fixed by calling LLViewerMediaFocus::clearFocus() right before setting the selection in LLInspectObject::onOpen(). --- indra/newview/llinspectobject.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinspectobject.cpp') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb35a287e9..b3bac0453a 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 @@ -214,6 +215,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); -- cgit v1.2.3