From 9121738b5b13d74dbc75a45605533d5fba31c089 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 16 Jan 2017 11:32:24 +0200 Subject: MAINT-1245 FIXED Script error particle not displaying above agent when script error comes from a HUD --- indra/newview/llfloaterscriptdebug.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterscriptdebug.cpp') diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 6c17f62c1e..5f4bc9d301 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -34,6 +34,7 @@ #include "llrect.h" #include "llerror.h" #include "llstring.h" +#include "llvoavatarself.h" #include "message.h" // project include @@ -105,7 +106,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: if (objectp) { - objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + if(objectp->isHUDAttachment()) + { + ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + } + else + { + objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + } floater_label = llformat("%s(%.0f, %.0f, %.0f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], -- cgit v1.2.3 From cf8860224084c6dfa96a5068e27293a2ce144120 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 1 Feb 2017 10:57:12 +0200 Subject: MAINT-725 Script debug floater functionality is borked, rendering it completely useless for scripters --- indra/newview/llfloaterscriptdebug.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterscriptdebug.cpp') 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("script_debug_output", LLUUID::null); + if (floater_output == NULL) + { + floater_output = dynamic_cast(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("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 -- cgit v1.2.3