diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-08-09 19:04:50 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-08-09 19:04:50 +0800 |
| commit | a2f28aa0bdb8c9a657cfe9767b141e16696538f8 (patch) | |
| tree | 339fe952d4bd53356df301c5478cfee4d92e4d7d /indra | |
| parent | 80082370d5ee5e9f039759f2000dcf74d1b076e5 (diff) | |
https://megapahit.com/show_bug.cgi?id=184
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
| -rw-r--r-- | indra/newview/lltoolpie.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_move.xml | 9 |
3 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8b6c5e2e1a..1a61e45180 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2763,6 +2763,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>PreventClickToSit</key> + <map> + <key>Comment</key> + <string>Prevent sitting on a chair on a click</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DynamicCameraStrength</key> <map> <key>Comment</key> diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 0a69be528f..a2122d0da5 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -237,6 +237,7 @@ bool LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks) // True if you selected an object. bool LLToolPie::handleLeftClickPick() { + static LLCachedControl<bool> prevent_click_to_sit(gSavedSettings, "PreventClickToSit"); S32 x = mPick.mMousePt.mX; S32 y = mPick.mMousePt.mY; MASK mask = mPick.mKeyMask; @@ -303,7 +304,7 @@ bool LLToolPie::handleLeftClickPick() break; case CLICK_ACTION_SIT: { - if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting + if (!prevent_click_to_sit && isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting { handle_object_sit_or_stand(); // put focus in world when sitting on an object @@ -498,6 +499,7 @@ U8 final_click_action(LLViewerObject* obj) ECursorType LLToolPie::cursorFromObject(LLViewerObject* object) { + static LLCachedControl<bool> prevent_click_to_sit(gSavedSettings, "PreventClickToSit"); LLViewerObject* parent = NULL; if (object) { @@ -509,7 +511,7 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object) { case CLICK_ACTION_SIT: { - if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting? + if (!prevent_click_to_sit && isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting? { cursor = UI_CURSOR_TOOLSIT; } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index 4cc0a06366..979aa691fc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -349,6 +349,15 @@ name="double_click_zoom_in" top_pad="10" width="200" /> + <check_box + control_name="PreventClickToSit" + height="20" + label="Prevent sitting on a chair on a click" + layout="topleft" + left="83" + name="prevent_click_to_sit" + top_pad="10" + width="200" /> </panel> <!-- ── Over-The-Shoulder tab ──────────────────────────────────────── --> |
