summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterscriptdebug.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-06 14:42:48 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-06 14:42:48 -0500
commit015463c7313f93b178c517519d71889ab897361a (patch)
tree26dab56ffa84f78bfeca57e7166ff96e565572d3 /indra/newview/llfloaterscriptdebug.cpp
parent09a6daabd2c4281b071f9213906872ea8a744956 (diff)
parent08ed7f676f2ce38937a03c2a4e823e3564981264 (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterscriptdebug.cpp')
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp41
1 files changed, 39 insertions, 2 deletions
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 6c17f62c1e..468537e659 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
@@ -80,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());
@@ -105,7 +136,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],
@@ -117,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