summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-07-12 10:15:08 -0400
committerGitHub <noreply@github.com>2024-07-12 10:15:08 -0400
commitdbfab7c12c47a2300854eb4e53b0ee68e2ff6e5e (patch)
tree12a08ddd740534f50d5bcd2ac7d398ecf87ceaff /indra/newview
parent014bfc04be6638533216f1ea18884d38632c5a99 (diff)
parentc9a8de49df04c55b94eee0fe5fb1eb628701cdcb (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')
-rw-r--r--indra/newview/llfloaterluadebug.cpp6
-rw-r--r--indra/newview/llfloatersettingsdebug.cpp14
-rw-r--r--indra/newview/llfloatersettingsdebug.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_settings_debug.xml13
4 files changed, 27 insertions, 7 deletions
diff --git a/indra/newview/llfloaterluadebug.cpp b/indra/newview/llfloaterluadebug.cpp
index 9981126e4f..ef24481464 100644
--- a/indra/newview/llfloaterluadebug.cpp
+++ b/indra/newview/llfloaterluadebug.cpp
@@ -104,12 +104,6 @@ void LLFloaterLUADebug::onBtnBrowse()
void LLFloaterLUADebug::onBtnRun()
{
- if (mExecuting)
- {
- LL_DEBUGS("Lua") << "recursive call to onBtnRun()" << LL_ENDL;
- return;
- }
- TempSet executing(mExecuting, true);
std::vector<std::string> filenames;
std::string filepath = mScriptPath->getText();
if (!filepath.empty())
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);
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index e52d5ac863..20aa9bb159 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -69,6 +69,7 @@ private:
protected:
class LLTextEditor* mComment;
+ LLTextEditor* mLLSDVal;
LLTextBox* mSettingName;
LLButton* mCopyBtn;
diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
index 6fd8f2b255..0b8190df7e 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
@@ -69,7 +69,7 @@
visible="false"
use_ellipses="true"
text_color="White"
- width="240">
+ width="225">
Debug setting name
</text>
<text_editor
@@ -212,4 +212,15 @@
name="hide_default"
width="330">
</check_box>
+ <text_editor
+ read_only="true"
+ visible="false"
+ height="115"
+ layout="topleft"
+ name="llsd_text"
+ follows="left|top"
+ width="240"
+ left="320"
+ top="180"
+ word_wrap="true" />
</floater>