diff options
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 | 
