diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-11-05 14:18:16 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-11-05 14:18:16 -0800 |
commit | 44fc2e5ba3a4aee321f13e0c0486a171725007a9 (patch) | |
tree | c50de74618cc81c5d6888f9931617040862516c3 /indra/newview/llviewermediafocus.cpp | |
parent | 1bf5f1465d9c1620df2582b4bb8131bacb344c09 (diff) |
Restore the media focus ring. This fixes DEV-42166.
Media focus is still tracked separately from LLSelectMgr (which was a change made during a refactor a while ago), but LLViewerMediaFocus now keeps LLSelectMgr updated with the current media focus when it changes.
Added a special case for media focus to LLSelectMgr::deselectAllIfTooFar(), since it was making the focus ring not show up when media focus was on distant media.
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r-- | indra/newview/llviewermediafocus.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 657c58364f..b2a0fa4b1c 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -77,6 +77,10 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac { old_media_impl->focus(false); } + + // Always clear the current selection. If we're setting focus on a face, we'll reselect the correct object below. + LLSelectMgr::getInstance()->deselectAll(); + mSelection = NULL; if (media_impl.notNull() && objectp.notNull()) { @@ -87,6 +91,9 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac mFocusedObjectFace = face; mFocusedObjectNormal = pick_normal; + // Set the selection in the selection manager so we can draw the focus ring. + mSelection = LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); + // Focusing on a media face clears its disable flag. media_impl->setDisabled(false); |