summaryrefslogtreecommitdiff
path: root/indra/llui/llviewmodel.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
committerBrad Linden <brad@lindenlab.com>2024-10-29 15:43:21 -0700
commit74b0c86e48387e2154cb2acf03f626ca11229bce (patch)
tree0c74138a6d0c60eb5dffcc745464b58a6b315036 /indra/llui/llviewmodel.cpp
parent9598e2f4cedd3dc36d447086273e0ed97967bbf9 (diff)
parent1a7909517368206d54407e54b9332aed1e4c9863 (diff)
Merge brad/2549-downrez-controls into release/2024.09-ExtraFPS (#2864)
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
-rw-r--r--indra/llui/llviewmodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index 93106b344f..35963c2b99 100644
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -82,11 +82,20 @@ void LLTextViewModel::setValue(const LLSD& value)
// approximate LLSD storage usage
LLViewModel::setValue(value);
mDisplay = utf8str_to_wstring(mStringValue = value.asString());
+ mDisplayGeneration++;
// mDisplay and mValue agree
mUpdateFromDisplay = false;
}
+LLWString& LLTextViewModel::getEditableDisplay()
+{
+ mDirty = true;
+ mDisplayGeneration++;
+ mUpdateFromDisplay = true;
+ return mDisplay;
+}
+
void LLTextViewModel::setDisplay(const LLWString& value)
{
// This is the strange way to alter the value. Normally we'd setValue()
@@ -94,6 +103,7 @@ void LLTextViewModel::setDisplay(const LLWString& value)
// value. But a text editor might want to edit the display string
// directly, then convert back to UTF8 on commit.
mDisplay = value;
+ mDisplayGeneration++;
mDirty = true;
// Don't immediately convert to UTF8 -- do it lazily -- we expect many
// more setDisplay() calls than getValue() calls. Just flag that it needs