diff options
author | Sekkmer <sekkmer@gmail.com> | 2025-04-29 05:29:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-29 06:29:52 +0300 |
commit | 65d70a8d8f211b462481e93f919a100c8b3b2af5 (patch) | |
tree | 146e685fb01843668fabd742d05e6382ab233907 | |
parent | 281c7cf66483cca87a3c96389ebf8f4c71b4d3ae (diff) |
Fix: ignore *pass-on* counters when detecting left-button grabs (#3990)
LLAgent::leftButtonGrabbed() must report TRUE only when an attachment has
**actually grabbed** the left mouse button (accept = TRUE, pass_on = FALSE), like every other ...Grabbed() function below it
-rw-r--r-- | indra/newview/llagent.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2161dbe19e..039bd4da2a 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3469,11 +3469,14 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) bool LLAgent::leftButtonGrabbed() const { - const bool camera_mouse_look = gAgentCamera.cameraMouselook(); - return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) - || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) - || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) - || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); + if (gAgentCamera.cameraMouselook()) + { + return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0; + } + else + { + return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0; + } } bool LLAgent::rotateGrabbed() const |