diff options
| author | Richard Linden <none@none> | 2013-01-04 16:46:25 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2013-01-04 16:46:25 -0800 |
| commit | 0d8f1077a62099915cb532dc354d0e450e3e6a79 (patch) | |
| tree | f76f43d025304bc6aa65d3f91663cac67a6715cc /indra/llui/llviewmodel.cpp | |
| parent | 0d12d171cf20c63a45e7ad0989e65d05aabb86ea (diff) | |
| parent | 7dbb8860373769dfca7d6c6588284866a1bf86a3 (diff) | |
Automated merge with http://bitbucket.org/lindenlab/viewer-development
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
| -rw-r--r-- | indra/llui/llviewmodel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp index a9f8acc440..1bd09e8086 100644 --- a/indra/llui/llviewmodel.cpp +++ b/indra/llui/llviewmodel.cpp @@ -35,6 +35,8 @@ // external library headers // other Linden headers +LLTrace::MemStat LLViewModel::sMemStat("LLViewModel"); + /// LLViewModel::LLViewModel() : mDirty(false) @@ -80,7 +82,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 +96,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 |
