summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-09 17:21:52 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-09 17:21:52 -0400
commit9180c4e7a9b92b2a69a95533acc7bc1a1a41f415 (patch)
tree958701fe8f07defcc1d7071b481318ab662313b7 /indra/llui/lltextbase.cpp
parent0c451a60b7fe859f9deeaefb6360e96ec9af630f (diff)
parentb7c82a8e7a5efcf56cf8c60ecc4922cf2942b70e (diff)
Merge branch 'develop' into release/luau-scripting
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 3aad8f5fe6..32fafe3c52 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -3342,7 +3342,6 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
const LLWString& text = getWText();
S32 text_gen = mEditor.getTextGeneration();
- bool is_text_read_only = mEditor.getReadOnly();
if (text_gen != mLastGeneration)
{
@@ -3354,8 +3353,8 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
}
const LLFontGL* font = mStyle->getFont();
-
- LLColor4 color = (is_text_read_only ? mStyle->getReadOnlyColor() : mStyle->getColor()) % (alpha * mStyle->getAlpha());
+ LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % (alpha * mStyle->getAlpha());
+ bool use_font_buffers = useFontBuffers();
if( selection_start > seg_start )
{
@@ -3363,7 +3362,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 start = seg_start;
S32 end = llmin( selection_start, seg_end );
S32 length = end - start;
- if (is_text_read_only)
+ if (use_font_buffers)
{
mFontBufferPreSelection.render(
font,
@@ -3407,7 +3406,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 end = llmin( selection_end, seg_end );
S32 length = end - start;
- if (is_text_read_only)
+ if (use_font_buffers)
{
mFontBufferSelection.render(
font,
@@ -3444,7 +3443,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 start = llmax( selection_end, seg_start );
S32 end = seg_end;
S32 length = end - start;
- if (is_text_read_only)
+ if (use_font_buffers)
{
mFontBufferPostSelection.render(
font,