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().
meow-7.2.2
Monroe Linden 2010-01-06 12:01:39 -08:00
parent d16f6a6e1a
commit 7586d8fcfd
1 changed files with 5 additions and 0 deletions

View File

@ -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);