diff options
author | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-12 06:54:04 -0600 |
---|---|---|
committer | Cinder <cinder.roxley@phoenixviewer.com> | 2014-05-12 06:54:04 -0600 |
commit | 6141aa44d0f2aa2662a536c9d3ce9312dd57bd99 (patch) | |
tree | f0f96ffafc5d67de1fd69ff4e2eefa64b7ef4f0e | |
parent | 059a29e976a41c30ec9fb346ae53bbc51aa682fc (diff) |
STORM-2027 - Fix syntax highlighting on subsequent opening of scripts.
This could use more refactoring, but it fixes it.
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index d83a2bc3a6..b300f3a39c 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -352,6 +352,7 @@ LLScriptEdCore::LLScriptEdCore( void (*save_callback)(void*, BOOL), void (*search_replace_callback) (void* userdata), void* userdata, + bool live, S32 bottom_pad) : LLPanel(), @@ -366,6 +367,7 @@ LLScriptEdCore::LLScriptEdCore( mLiveHelpHistorySize(0), mEnableSave(FALSE), mLiveFile(NULL), + mLive(live), mContainer(container), mHasScriptData(FALSE) { @@ -420,7 +422,7 @@ BOOL LLScriptEdCore::postBuild() } else { - LL_DEBUGS("SyntaxLSL") << "Hashes are the same, no need to update highlighter." << LL_ENDL; + processKeywords(); } mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); @@ -1289,8 +1291,8 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) LLPreviewLSL::onSave, LLPreviewLSL::onSearchReplace, self, + false, 0); - self->mScriptEd->mLive = false; return self->mScriptEd; } @@ -1745,8 +1747,8 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) &LLLiveLSLEditor::onSave, &LLLiveLSLEditor::onSearchReplace, self, + true, 0); - self->mScriptEd->mLive = true; return self->mScriptEd; } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 8b98b908e1..e19a87ec0a 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -72,6 +72,7 @@ protected: void (*save_callback)(void* userdata, BOOL close_after_save), void (*search_replace_callback)(void* userdata), void* userdata, + bool live, S32 bottom_pad = 0); // pad below bottom row of buttons public: ~LLScriptEdCore(); |