summaryrefslogtreecommitdiff
path: root/indra/llui/llxyvector.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-01 18:35:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 21:58:53 +0800
commit00bb3bb6f07660bd914d29a1389342bb3060d254 (patch)
tree431f574922494d2201718f13085f17bc6bd7fb42 /indra/llui/llxyvector.cpp
parenta8636720129952c10cf49ab80da21bf8b340b96c (diff)
parent4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff)
Merge remote-tracking branch 'secondlife/release/26.4' into 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);