diff options
Diffstat (limited to 'indra/newview/llfloaterluadebug.cpp')
-rw-r--r-- | indra/newview/llfloaterluadebug.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloaterluadebug.cpp b/indra/newview/llfloaterluadebug.cpp index 7d56d8e618..2d9dc89340 100644 --- a/indra/newview/llfloaterluadebug.cpp +++ b/indra/newview/llfloaterluadebug.cpp @@ -27,6 +27,7 @@ #include "llfloaterluadebug.h" +#include "llcheckboxctrl.h" #include "lllineeditor.h" #include "lltexteditor.h" #include "llviewermenufile.h" // LLFilePickerReplyThread @@ -79,6 +80,7 @@ void LLFloaterLUADebug::onExecuteClicked() mResultOutput->setValue(""); std::string cmd = mLineInput->getText(); + cleanLuaState(); LLLUAmanager::runScriptLine(mState, cmd, [this](int count, const LLSD& result) { completion(count, result); @@ -109,6 +111,7 @@ void LLFloaterLUADebug::runSelectedScript(const std::vector<std::string> &filena if (!filepath.empty()) { mScriptPath->setText(filepath); + cleanLuaState(); LLLUAmanager::runScriptFile(mState, filepath, [this](int count, const LLSD& result) { completion(count, result); @@ -140,3 +143,12 @@ void LLFloaterLUADebug::completion(int count, const LLSD& result) sep = ", "; } } + +void LLFloaterLUADebug::cleanLuaState() +{ + if(getChild<LLCheckBoxCtrl>("clean_lua_state")->get()) + { + //Reinit to clean lua_State + mState.initLuaState(); + } +} |