diff options
Diffstat (limited to 'indra/newview/llfloaterluascripts.cpp')
-rw-r--r-- | indra/newview/llfloaterluascripts.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llfloaterluascripts.cpp b/indra/newview/llfloaterluascripts.cpp index bd845a97d6..30353a7210 100644 --- a/indra/newview/llfloaterluascripts.cpp +++ b/indra/newview/llfloaterluascripts.cpp @@ -43,7 +43,20 @@ LLFloaterLUAScripts::LLFloaterLUAScripts(const LLSD &key) { mCommitCallbackRegistrar.add("Script.OpenFolder", [this](LLUICtrl*, const LLSD &userdata) { - gViewerWindow->getWindow()->openFolder(mTargetFolderPath); + if (mScriptList->hasSelectedItem()) + { + std::string target_folder_path = std::filesystem::path((mScriptList->getFirstSelected()->getColumn(1)->getValue().asString())).parent_path().string(); + gViewerWindow->getWindow()->openFolder(target_folder_path); + } + }); + mCommitCallbackRegistrar.add("Script.Terminate", [this](LLUICtrl*, const LLSD &userdata) + { + if (mScriptList->hasSelectedItem()) + { + std::string coro_name = mScriptList->getSelectedValue(); + LLEventPumps::instance().obtain("LLLua").post(llsd::map("status", "close", "coro", coro_name)); + LLLUAmanager::terminateScript(coro_name); + } }); } @@ -112,7 +125,6 @@ void LLFloaterLUAScripts::onScrollListRightClicked(LLUICtrl *ctrl, S32 x, S32 y) auto menu = mContextMenuHandle.get(); if (menu) { - mTargetFolderPath = std::filesystem::path((item->getColumn(1)->getValue().asString())).parent_path().string(); menu->show(x, y); LLMenuGL::showPopup(this, menu, x, y); } |