FIX EXT-5517: clear hover face when cursor hovers over Nearby Media panel

Review #140
This isn't the most generalized solution, but it fixes the proximal
problem of selecting items in the Nearby Media panel, and is low risk
because the code change is isolated to that panel.
meow-7.2.2
Rick Pasetto 2010-02-23 18:13:50 -08:00
parent 8cf7dad209
commit 262f34b25d
3 changed files with 20 additions and 11 deletions

View File

@ -231,6 +231,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f;
const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f;
/*virtual*/
void LLPanelNearByMedia::draw()
{
//LLUICtrl* new_top = gFocusMgr.getTopCtrl();
@ -265,6 +266,21 @@ void LLPanelNearByMedia::draw()
}
}
/*virtual*/
BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
{
LLPanel::handleHover(x, y, mask);
// If we are hovering over this panel, make sure to clear any hovered media
// ID. Note that the more general solution would be to clear this ID when
// the mouse leaves the in-scene view, but that proved to be problematic.
// See EXT-5517
LLViewerMediaFocus::getInstance()->clearHover();
// Always handle
return true;
}
bool LLPanelNearByMedia::getParcelAudioAutoStart()
{
return mParcelAudioAutoStart;

View File

@ -56,6 +56,7 @@ public:
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
/*virtual*/ void onTopLost ();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
// this is part of the nearby media *dialog* so we can track whether
// the user *implicitly* wants audio on or off via their *explicit*

View File

@ -2,6 +2,7 @@
<panel
can_resize="true"
can_close="false"
mouse_opaque="true"
bg_opaque_image="Volume_Background"
bg_alpha_image="Volume_Background"
background_opaque="true"
@ -132,6 +133,7 @@
ame="OnOthers" />
</combo_box>
<scroll_list
name="media_list"
follows="left|top|bottom|right"
column_padding="0"
height="105"
@ -140,8 +142,7 @@
bg_stripe_color="0.25 0.25 0.25 0.25"
top_pad="8"
left="10"
right="-10"
name="media_list">
right="-10">
<scroll_list.columns
type="checkbox"
width="-1"
@ -189,11 +190,9 @@
left="10"
right="-10"
border_size="0"
mouse_opaque="false"
orientation="horizontal">
<layout_panel
name="stop"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -221,7 +220,6 @@
</layout_panel>
<layout_panel
name="play"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -249,7 +247,6 @@
</layout_panel>
<layout_panel
name="pause"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -276,7 +273,6 @@
</layout_panel>
<layout_panel
name="volume_slider_ctrl"
mouse_opaque="false"
auto_resize="true"
user_resize="false"
follows="left|right"
@ -301,7 +297,6 @@
</layout_panel>
<layout_panel
name="mute"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -330,7 +325,6 @@
</layout_panel>
<layout_panel
name="zoom"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -358,7 +352,6 @@
</layout_panel>
<layout_panel
name="unzoom"
mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@ -387,7 +380,6 @@
<layout_panel
name="right_bookend"
width="0"
mouse_opaque="false"
user_resize="false" />
</layout_stack>
</panel>