diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsyntaxid.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsyntaxid.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9e54c521b5..10a9dee415 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -50,6 +50,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() , mCapabilityURL(std::string()) , mFilePath(LL_PATH_APP_SETTINGS) , mSyntaxId(LLUUID()) +, mInitialized(false) { loadDefaultKeywordsIntoLLSD(); mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this)); @@ -179,6 +180,7 @@ void LLSyntaxIdLSL::cacheFile(const std::string &fileSpec, const LLSD& content_r //----------------------------------------------------------------------------- void LLSyntaxIdLSL::initialize() { + if(mInitialized) return; if (mSyntaxId.isNull()) { loadDefaultKeywordsIntoLLSD(); @@ -213,6 +215,7 @@ void LLSyntaxIdLSL::initialize() LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } + mInitialized = true; } //----------------------------------------------------------------------------- @@ -303,6 +306,7 @@ void LLSyntaxIdLSL::handleRegionChanged() { buildFullFileSpec(); fetchKeywordsFile(mFullFileSpec); + mInitialized = false; } } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1360b3e042..caddba5527 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -65,6 +65,7 @@ private: ELLPath mFilePath; LLUUID mSyntaxId; LLSD mKeywordsXml; + bool mInitialized; public: void initialize(); |