summaryrefslogtreecommitdiff
path: root/indra/newview/llsyntaxid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsyntaxid.cpp')
-rw-r--r--indra/newview/llsyntaxid.cpp4
1 files changed, 4 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;
}
}