summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-09 19:07:07 -0700
committerRichard Linden <none@none>2010-09-09 19:07:07 -0700
commitf6645b10dd391218edff67579a4388dc8bbac7d2 (patch)
treef91825b6d518753a8af3155cda3875b3539fd133
parent6c2c87e8b96edf0b5c222b355b39915827ec7fda (diff)
DEV-53015 FIX Volume slider disappears when sliding on panel_prim_media_controls.xml
-rw-r--r--indra/llui/llbutton.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 40520c1b79..ceb1434b6a 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -558,15 +558,19 @@ void LLButton::draw()
pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN));
}
- // Unselected image assignments
- S32 local_mouse_x;
- S32 local_mouse_y;
- LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y);
+ bool mouse_pressed_and_over = false;
+ if (hasMouseCapture())
+ {
+ S32 local_mouse_x ;
+ S32 local_mouse_y;
+ LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y);
+ mouse_pressed_and_over = pointInView(local_mouse_x, local_mouse_y);
+ }
bool enabled = isInEnabledChain();
bool pressed = pressed_by_keyboard
- || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y))
+ || mouse_pressed_and_over
|| mForcePressedState;
bool selected = getToggleState();