From 2d7fb5c67580620fd707b4fde3c497886e050dd1 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 28 Dec 2014 09:34:28 -0500 Subject: STORM-2094 Save button not activated if spelling corrected in Notecard and no other changes made --- indra/llui/lltextbase.cpp | 1 + indra/llui/lltextbase.h | 1 + indra/llui/lltexteditor.cpp | 8 ++++++++ indra/llui/lltexteditor.h | 2 ++ 4 files changed, 12 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 9b125a85b9..e51f2a212f 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1316,6 +1316,7 @@ void LLTextBase::replaceWithSuggestion(U32 index) setCursorPos(it->first + (S32)suggestion.length()); + onSpellCheckPerformed(); break; } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 738b4d5b8e..51fe904b4f 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -362,6 +362,7 @@ public: std::string getMisspelledWord(U32 pos) const; bool isMisspelledWord(U32 pos) const; void onSpellCheckSettingsChange(); + virtual void onSpellCheckPerformed(){} // used by LLTextSegment layout code bool getWordWrap() { return mWordWrap; } diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index cf5fdef539..227b1f91a9 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2380,6 +2380,14 @@ void LLTextEditor::removeTextFromEnd(S32 num_chars) //---------------------------------------------------------------------------- +void LLTextEditor::onSpellCheckPerformed() +{ + if (isPristine()) + { + mBaseDocIsPristine = FALSE; + } +} + void LLTextEditor::makePristine() { mPristineCmd = mLastCmd; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index f6bdf917b4..26702b2412 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -160,6 +160,8 @@ public: autoreplace_callback_t mAutoreplaceCallback; void setAutoreplaceCallback(autoreplace_callback_t cb) { mAutoreplaceCallback = cb; } + /*virtual*/ void onSpellCheckPerformed(); + // // Text manipulation // -- cgit v1.2.3