summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexteditor.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-10-13 14:30:21 -0400
committerGitHub <noreply@github.com>2026-10-13 14:30:21 -0400
commit8ba5d1a8adc47c21b23d9482e72de9517f9a98fc (patch)
treef97d67c8ee574c6ebaac8d0d8ba120d041dca051 /indra/newview/llviewertexteditor.cpp
parent18648fc51e2a0c750182d8aa3814ed5b6bf8445e (diff)
parentefc7d2d7bb542ac905cb7ebd82ee329523f95608 (diff)
Merge pull request #6193 from secondlife/release/26.4
Release/26.4
Diffstat (limited to 'indra/newview/llviewertexteditor.cpp')
-rw-r--r--indra/newview/llviewertexteditor.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 95e34b4df1..a58d7546ce 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -249,6 +249,25 @@ public:
/*virtual*/ bool canEdit() const { return false; }
+ /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask)
+ {
+ bool show_menu = !mEditor.hasSelection()
+ || (mEditor.mSelectionStart == mStart && mEditor.mSelectionEnd == mStart + 1);
+ if (show_menu && mEditor.getShowContextMenu())
+ {
+ // User clicked an item, user expects the menu to be
+ // in 'context' for the item. Change selection to match.
+ // Todo: Might be better to 'smartly' deselect here
+ // and to have an object specific menu.
+ mEditor.setCursorPos(mStart + 1);
+ mEditor.mSelectionStart = mStart;
+ mEditor.mSelectionEnd = mStart + 1;
+
+ mEditor.showContextMenu(x, y);
+ return true;
+ }
+ return false;
+ }
/*virtual*/ bool handleHover(S32 x, S32 y, MASK mask)
{