diff options
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 34ad95e228..19aab8f383 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -34,6 +34,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldir.h" +#include "llenvmanager.h" #include "llexternaleditor.h" #include "llfilepicker.h" #include "llfloaterreg.h" @@ -406,13 +407,14 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - initKeywords(); - + onRegionChangeInitialiseKeywords(); + //LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords(), this)); return TRUE; } -void LLScriptEdCore::initKeywords() +void LLScriptEdCore::onRegionChangeInitialiseKeywords() { + mEditor->mKeywords.clearLoaded(); mSyntaxIdLSL.initialise(); mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 149c27461e..2dd5a1b6a7 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); - void initKeywords(); + void onRegionChangeInitialiseKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); |