diff options
author | Rye <rye@lindenlab.com> | 2024-11-07 13:12:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-07 13:12:42 -0500 |
commit | 56b93ddde257f6901ef28efa90b4e600f53384f5 (patch) | |
tree | c097a77a1b1bd2a6c6da6077dd777482cd461999 /indra | |
parent | 02e0862d9b832c0a8db2d7dbc4b0fce4c38dd809 (diff) | |
parent | c3de8aeb981e6494b22525f6463d186b129cbcf2 (diff) |
Merge pull request #3036 from secondlife/rye/menufix
Fix url and toolbar menus binding callback functions to global scope
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltoolbar.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2a8b71055d..08d49aef3c 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2110,7 +2110,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) // set up the callbacks for all of the potential menu items, N.B. we // don't use const ref strings in callbacks in case url goes out of scope - CommitRegistrarHelper registrar(LLUICtrl::CommitCallbackRegistry::currentRegistrar()); + ScopedRegistrarHelper registrar; registrar.add("Url.Open", boost::bind(&LLUrlAction::openURL, url)); registrar.add("Url.OpenInternal", boost::bind(&LLUrlAction::openURLInternal, url)); registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url)); diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 6e6e332632..0af587eb0d 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -144,7 +144,7 @@ void LLToolBar::createContextMenu() { // Setup bindings specific to this instance for the context menu options - CommitRegistrarHelper commit_reg(LLUICtrl::CommitCallbackRegistry::currentRegistrar()); + ScopedRegistrarHelper commit_reg; commit_reg.add("Toolbars.EnableSetting", boost::bind(&LLToolBar::onSettingEnable, this, _2)); commit_reg.add("Toolbars.RemoveSelectedCommand", boost::bind(&LLToolBar::onRemoveSelectedCommand, this)); |