From 3816ece8193b901997d33a48dd5db1ddef10042a Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 9 Feb 2023 05:47:46 -0500 Subject: [PATCH] Fix debug settings floater --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/llfloatersettingsdebug.cpp | 2 +- indra/newview/llviewermenu.cpp | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 5dc1b147cca..d0001e8b8d0 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -80,8 +80,8 @@ icon="Command_Debug_Icon" label_ref="Command_Debug_Label" tooltip_ref="Command_Debug_Tooltip" - execute_function="Floater.ToggleOrBringToFront" - execute_parameters="settings_debug" + execute_function="Advanced.ToggleDebugSettings" + execute_parameters="all" is_running_function="Floater.IsOpen" is_running_parameters="settings_debug" /> diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 995bf1a9766..dee5cf864b3 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -40,7 +40,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) -: LLFloater(key.asString().empty() ? LLSD("all") : key), +: LLFloater(key), mSettingList(NULL) { mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c0d82a81294..abc73fff141 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2378,6 +2378,14 @@ class LLAdvancedShowDebugSettings : public view_listener_t } }; +class LLAdvancedToggleDebugSettings : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloaterReg::toggleInstanceOrBringToFront("settings_debug",userdata); + return true; + } +}; //////////////////////// @@ -9933,6 +9941,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage"); view_listener_t::addMenu(new LLAdvancedCompressFileTest(), "Advanced.CompressFileTest"); view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings"); + view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ToggleDebugSettings"); view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); -- GitLab