diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2023-09-15 21:30:26 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2023-09-15 21:30:26 +0100 |
commit | 66f39dece85d38afb1d8272ca89112ea70e05494 (patch) | |
tree | 69fdd9baeef0d57ffd47987912c9c1f88712ba15 /indra/newview/llfloaterluadebug.cpp | |
parent | a870b767337d0f9c54953189f99a77ca06d634a4 (diff) |
DRTVWR-589 - lua file browser added run button to allow re-running same script
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 e7d220c503..9ca554d4ad 100644 --- a/indra/newview/llfloaterluadebug.cpp +++ b/indra/newview/llfloaterluadebug.cpp @@ -57,6 +57,7 @@ BOOL LLFloaterLUADebug::postBuild() getChild<LLButton>("execute_btn")->setClickedCallback(boost::bind(&LLFloaterLUADebug::onExecuteClicked, this)); getChild<LLButton>("browse_btn")->setClickedCallback(boost::bind(&LLFloaterLUADebug::onBtnBrowse, this)); + getChild<LLButton>("run_btn")->setClickedCallback(boost::bind(&LLFloaterLUADebug::onBtnRun, this)); #if !LL_WINDOWS getChild<LLButton>("execute_btn")->setEnabled(false); @@ -85,6 +86,17 @@ void LLFloaterLUADebug::onBtnBrowse() (new LLFilePickerReplyThread(boost::bind(&LLFloaterLUADebug::runSelectedScript, this, _1), LLFilePicker::FFLOAD_LUA, false))->getFile(); } +void LLFloaterLUADebug::onBtnRun() +{ + std::vector<std::string> filenames; + std::string filepath = mScriptPath->getText(); + if (!filepath.empty()) + { + filenames.push_back(filepath); + runSelectedScript(filenames); + } +} + void LLFloaterLUADebug::runSelectedScript(const std::vector<std::string> &filenames) { mResultOutput->setValue(""); |