diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 0d2cbc9f05..d39da5c429 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -65,7 +65,10 @@ LLFloaterScriptDebug::~LLFloaterScriptDebug() void LLFloaterScriptDebug::show(const LLUUID& object_id) { - addOutputWindow(object_id); + // Script debug icon + //addOutputWindow(object_id); + addOutputWindow(object_id, true); + // Script debug icon } BOOL LLFloaterScriptDebug::postBuild() @@ -85,7 +88,8 @@ BOOL LLFloaterScriptDebug::postBuild() return FALSE; } -LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) +//LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) +LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID& object_id, bool show /* = false */) { LLMultiFloater* host = LLFloaterReg::showTypedInstance("script_debug", LLSD()); if (!host) @@ -96,6 +100,13 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE); LLFloater::setFloaterHost(NULL); + // Script debug icon + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 0 && !show) + { + host->closeFloater(); + } + // Script debug icon + return floaterp; } diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 6d9d1eb500..ae259ccf39 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -42,7 +42,10 @@ public: static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id); protected: - static LLFloater* addOutputWindow(const LLUUID& object_id); + // Script debug icon + //static LLFloater* addOutputWindow(const LLUUID& object_id); + static LLFloater* addOutputWindow(const LLUUID& object_id, bool show = false); + // Script debug icon protected: static LLFloaterScriptDebug* sInstance; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index e9df7e5d0a..2ad92dfbb4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -599,7 +599,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, return; } - if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) + // Script debug icon + //if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) { LLColor4 txt_color; @@ -610,7 +611,14 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, chat_msg.mFromName, txt_color, chat_msg.mFromID); - return; + // Script debug icon + //return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1) + { + return; + } + // Script debug icon + } }