summaryrefslogtreecommitdiff
path: root/indra/llui/llxyvector.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/llui/llxyvector.cpp
parent18648fc51e2a0c750182d8aa3814ed5b6bf8445e (diff)
parentefc7d2d7bb542ac905cb7ebd82ee329523f95608 (diff)
Merge pull request #6193 from secondlife/release/26.4
Release/26.4
Diffstat (limited to 'indra/llui/llxyvector.cpp')
-rw-r--r--indra/llui/llxyvector.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp
index 1521823ce2..b3c38bf82d 100644
--- a/indra/llui/llxyvector.cpp
+++ b/indra/llui/llxyvector.cpp
@@ -211,7 +211,16 @@ void LLXYVector::draw()
mGhostY = pointY;
}
- if (abs(mValueX) >= mIncrementX || abs(mValueY) >= mIncrementY)
+ S32 dx = abs(pointX - centerX);
+ S32 dy = abs(pointY - centerY);
+ bool draw_arrow =
+ (abs(mValueX) >= mIncrementX || abs(mValueY) >= mIncrementY)
+ && (dx >= 1 || dy >= 1); // At least 1 pixel displacement
+
+ // Todo: Arrow doesn't display well with small values.
+ // Ex: (0.1, 0.05) will point to the right, as if it is (0.1, 0.0)
+ // as position will be offset by a single pixes on X, and 0 pixels on Y.
+ if (draw_arrow)
{
// draw the vector arrow
drawArrow(centerX, centerY, pointX, pointY, mArrowColor);