summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-02-01 10:57:12 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-02-01 10:57:12 +0200
commitcf8860224084c6dfa96a5068e27293a2ce144120 (patch)
tree1a8f88a8550e61bc54d5c79a4dba436dbed28539 /indra
parente10cc6d69dae10be846e20bbda74fc9cf9561729 (diff)
MAINT-725 Script debug floater functionality is borked, rendering it completely useless for scripters
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp31
-rw-r--r--indra/newview/llfloaterscriptdebug.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_debug.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml10
4 files changed, 44 insertions, 1 deletions
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 5f4bc9d301..468537e659 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -81,6 +81,36 @@ BOOL LLFloaterScriptDebug::postBuild()
return FALSE;
}
+void LLFloaterScriptDebug::setVisible(BOOL visible)
+{
+ if(visible)
+ {
+ LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null);
+ if (floater_output == NULL)
+ {
+ floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE));
+ if (floater_output)
+ {
+ addFloater(floater_output, false);
+ }
+ }
+
+ }
+ LLMultiFloater::setVisible(visible);
+}
+
+void LLFloaterScriptDebug::closeFloater(bool app_quitting/* = false*/)
+{
+ if(app_quitting)
+ {
+ LLMultiFloater::closeFloater(app_quitting);
+ }
+ else
+ {
+ setVisible(false);
+ }
+}
+
LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id)
{
LLMultiFloater* host = LLFloaterReg::showTypedInstance<LLMultiFloater>("script_debug", LLSD());
@@ -125,7 +155,6 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
floater_label = user_name;
}
- addOutputWindow(LLUUID::null);
addOutputWindow(source_id);
// add to "All" floater
diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h
index 6d9d1eb500..8c08b234f3 100644
--- a/indra/newview/llfloaterscriptdebug.h
+++ b/indra/newview/llfloaterscriptdebug.h
@@ -38,7 +38,10 @@ public:
LLFloaterScriptDebug(const LLSD& key);
virtual ~LLFloaterScriptDebug();
virtual BOOL postBuild();
+ virtual void setVisible(BOOL visible);
static void show(const LLUUID& object_id);
+
+ /*virtual*/ void closeFloater(bool app_quitting = false);
static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id);
protected:
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug.xml b/indra/newview/skins/default/xui/en/floater_script_debug.xml
index 53d4925214..cd88048d6b 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug.xml
@@ -7,6 +7,7 @@
help_topic="script_debug_floater"
save_rect="true"
title="Script Warning/Error"
+ reuse_instance="true"
width="450">
<tab_container
follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 7c128d1523..332d79e1ea 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1025,6 +1025,16 @@
label="Scripts"
name="Scripts"
tear_off="true">
+ <menu_item_check
+ label="Script warnings/errors..."
+ name="Script debug">
+ <menu_item_check.on_check
+ function="Floater.IsOpen"
+ parameter="script_debug" />
+ <menu_item_check.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="script_debug" />
+ </menu_item_check>
<menu_item_call
label="Recompile Scripts (Mono)"
name="Mono">