summaryrefslogtreecommitdiff
path: root/indra/llui/llviewmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
-rw-r--r--indra/llui/llviewmodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index a9f8acc440..dff0dcb2fd 100644
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -80,7 +80,10 @@ LLTextViewModel::LLTextViewModel(const LLSD& value)
void LLTextViewModel::setValue(const LLSD& value)
{
LLViewModel::setValue(value);
+ memDisclaim(mDisplay);
mDisplay = utf8str_to_wstring(value.asString());
+ memClaim(mDisplay);
+
// mDisplay and mValue agree
mUpdateFromDisplay = false;
}
@@ -91,7 +94,9 @@ void LLTextViewModel::setDisplay(const LLWString& value)
// and do the utf8str_to_wstring() to get the corresponding mDisplay
// value. But a text editor might want to edit the display string
// directly, then convert back to UTF8 on commit.
+ memDisclaim(mDisplay);
mDisplay = value;
+ memClaim(mDisplay);
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