diff options
author | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-12 07:23:52 -0600 |
---|---|---|
committer | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-12 07:23:52 -0600 |
commit | 70aff2154b910afd9a8bdc14c72c4e058c8b1076 (patch) | |
tree | 0be0e467586036914400f23a7d99d9ece27a2f44 /indra/newview | |
parent | 6141aa44d0f2aa2662a536c9d3ce9312dd57bd99 (diff) |
Eliminate updateKeywords()
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 26 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.h | 1 |
2 files changed, 12 insertions, 15 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b300f3a39c..5e7b148101 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -391,8 +391,14 @@ LLScriptEdCore::~LLScriptEdCore() } delete mLiveFile; - mRegionChangedCallback.disconnect(); - mFileFetchedCallback.disconnect(); + if (mRegionChangedCallback.connected()) + { + mRegionChangedCallback.disconnect(); + } + if (mFileFetchedCallback.connected()) + { + mFileFetchedCallback.disconnect(); + } } BOOL LLScriptEdCore::postBuild() @@ -424,21 +430,13 @@ BOOL LLScriptEdCore::postBuild() { processKeywords(); } - mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); - - return TRUE; -} - -void LLScriptEdCore::updateKeywords() -{ + if (mLive) { - mEditor->clearSegments(); - } - else - { - processLoaded(); + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::processLoaded, this)); } + + return TRUE; } void LLScriptEdCore::processLoaded() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index e19a87ec0a..5aab3ed938 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -81,7 +81,6 @@ public: void initMenu(); void processKeywords(); void processLoaded(); - void updateKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); |