diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-07-12 10:15:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-12 10:15:08 -0400 |
commit | dbfab7c12c47a2300854eb4e53b0ee68e2ff6e5e (patch) | |
tree | 12a08ddd740534f50d5bcd2ac7d398ecf87ceaff /indra/newview/llfloatersettingsdebug.cpp | |
parent | 014bfc04be6638533216f1ea18884d38632c5a99 (diff) | |
parent | c9a8de49df04c55b94eee0fe5fb1eb628701cdcb (diff) |
Merge pull request #2009 from secondlife/lua-llsd-debug-setting
Show description and actual value of LLSD type setting
Diffstat (limited to 'indra/newview/llfloatersettingsdebug.cpp')
-rw-r--r-- | indra/newview/llfloatersettingsdebug.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 1c10db4e0d..a494b715a2 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -35,6 +35,7 @@ #include "llviewercontrol.h" #include "lltexteditor.h" #include "llclipboard.h" +#include "llsdutil.h" LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) @@ -54,6 +55,7 @@ BOOL LLFloaterSettingsDebug::postBuild() mComment = getChild<LLTextEditor>("comment_text"); mSettingName = getChild<LLTextBox>("setting_name_txt"); + mLLSDVal = getChild<LLTextEditor>("llsd_text"); mCopyBtn = getChild<LLButton>("copy_btn"); getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2)); @@ -472,6 +474,17 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) color_swatch->setValue(sd); break; } + case TYPE_LLSD: + { + mLLSDVal->setVisible(true); + std::string new_text = ll_pretty_print_sd(sd); + // Don't setText if not nessesary, it will reset scroll + if (mLLSDVal->getText() != new_text) + { + mLLSDVal->setText(new_text); + } + break; + } default: mComment->setText(std::string("unknown")); break; @@ -638,6 +651,7 @@ void LLFloaterSettingsDebug::hideUIControls() getChildView("val_text")->setVisible(false); getChildView("default_btn")->setVisible(false); getChildView("boolean_combo")->setVisible(false); + mLLSDVal->setVisible(false); mSettingName->setVisible(false); mCopyBtn->setVisible(false); mComment->setVisible(false); |