From 1781e2d17b777e32e9b51e5a901c1295db80a4d8 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 8 Mar 2024 13:25:43 +0100 Subject: viewer#944 Make 'Debug Unicode' feature available for all LLViews --- indra/llui/llviewmodel.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui/llviewmodel.h') diff --git a/indra/llui/llviewmodel.h b/indra/llui/llviewmodel.h index e7dceb6c31..ffd67f455d 100644 --- a/indra/llui/llviewmodel.h +++ b/indra/llui/llviewmodel.h @@ -100,6 +100,7 @@ public: // LLViewModel functions virtual void setValue(const LLSD& value); virtual LLSD getValue() const; + const std::string& getStringValue() const; // New functions /// Get the stored value in string form @@ -114,12 +115,17 @@ public: void setDisplay(const LLWString& value); private: + std::string mStringValue; + /// To avoid converting every widget's stored value from LLSD to LLWString /// every frame, cache the converted value LLWString mDisplay; + /// As the user edits individual characters (setDisplay()), defer /// LLWString-to-UTF8 conversions until s/he's done. bool mUpdateFromDisplay; + + friend void updateFromDisplayIfNeeded(const LLTextViewModel* model); }; /** -- cgit v1.2.3