From 8e53c5bfb0e9feffa0450b362f21f56036b9b75c Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Wed, 26 Mar 2014 20:31:05 +0000 Subject: storm-1831 Removing the callback after first region crossing. Prevents repeated callbacks after highlighting has been removed for live script. --- indra/newview/llpreviewscript.cpp | 9 +++------ indra/newview/llpreviewscript.h | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 4c6f4fd3ba..84e7a1650d 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -434,7 +434,7 @@ void LLScriptEdCore::updateKeywords() if (mLive) { clearHighlights(); - gAgent.removeRegionChangedCallback(mRegionChangedCallback); + mRegionChangedCallback.disconnect(); } else { @@ -458,9 +458,7 @@ void LLScriptEdCore::processLoaded() void LLScriptEdCore::clearHighlights() { - mEditor->mKeywords.clearLoaded(); mEditor->clearSegments(); - mEditor->mKeywords.clear(); } void LLScriptEdCore::processKeywords() @@ -1309,7 +1307,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) LLPreviewLSL::onSearchReplace, self, 0); - + self->mScriptEd->mLive = false; return self->mScriptEd; } @@ -1324,7 +1322,7 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) // virtual BOOL LLPreviewLSL::postBuild() { - const LLInventoryItem* item = getItem(); + const LLInventoryItem* item = getItem(); llassert(item); if (item) @@ -1756,7 +1754,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset //static void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) { - LLLiveLSLEditor *self = (LLLiveLSLEditor*)userdata; self->mScriptEd = new LLScriptEdCore( diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 0841c8188b..dc4f828cf1 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -162,6 +162,7 @@ private: LLScriptEdContainer* mContainer; // parent view public: + boost::signals2::connection mFileFetchedCallback; boost::signals2::connection mRegionChangedCallback; }; -- cgit v1.2.3 From 8bc42784122619e3f37afabbc5888821c3430369 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 28 Mar 2014 17:21:36 +0000 Subject: strom-1831: Cleaning out commented and unused code --- indra/llui/llkeywords.cpp | 10 ---------- indra/llui/llkeywords.h | 1 - indra/newview/llsyntaxid.h | 3 --- 3 files changed, 14 deletions(-) (limited to 'indra') diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 82b50f43ab..b495709ce0 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -134,16 +134,6 @@ void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, } } -void LLKeywords::clear() -{ - clearLoaded(); - mSyntax = LLSD(); - - std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer()); - std::for_each(mLineTokenList.begin(), mLineTokenList.end(), DeletePointer()); - std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer()); -} - std::string LLKeywords::getArguments(LLSD& arguments) { std::string argString = ""; diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index de7645a5d2..689fd75bcd 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -110,7 +110,6 @@ public: ~LLKeywords(); void addColorGroup(const std::string key_in, const LLColor4 color); - void clear(); void clearLoaded() { mLoaded = false; } LLColor4 getColorGroup(const std::string key_in); bool isLoaded() const { return mLoaded; } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1b6903f2a2..7d6e120038 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -54,8 +54,6 @@ public: static const std::string SIMULATOR_FEATURE; protected: - //LLViewerRegion* region; - static bool sInitialised; static LLSD sKeywordsXml; static bool sLoaded; @@ -111,7 +109,6 @@ protected: void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } void setFileNameNew(std::string name) { mFileNameNew = name; } -// void setSimulatorFeatureName(const std::string& name) { mSimulatorFeature = name; } }; -- cgit v1.2.3 From 08ca5279ffbf3e47fc42a32e38339ce806df1741 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 28 Mar 2014 21:32:30 +0000 Subject: storm-1831: Fixing the remaining LL_ERRS. --- indra/newview/llsyntaxid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 80511cd73f..14265fd3af 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -412,7 +412,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() } else { - LL_ERRS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; } sLoadFailed = !sLoaded; } -- cgit v1.2.3