summaryrefslogtreecommitdiff
path: root/indra/llui/llviewmodel.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-05 15:40:12 -0400
committerGitHub <noreply@github.com>2024-09-05 15:40:12 -0400
commit04568da18d2261f3f7b851cf5341b766c9648204 (patch)
tree83d5db1c173636bb77ebb33e860fac77ab5d79e8 /indra/llui/llviewmodel.cpp
parent18d81e20f0b0044c16615953d7b69d7fb34d3449 (diff)
parentff2d79906ccef217194d5d9ec9d7025db03592a8 (diff)
Merge pull request #2513 from secondlife/lua-merge-dev
Merge develop branch into Lua project branch.
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