X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.cpp;h=9f524dc9b3e2a5a8e67d88c208ee716f4086e0f2;hb=97ad1b9af574f894127d52691d793b219b7003e0;hp=f82eada0fad1e211cab6fc4269eaf30b9b7359f1;hpb=b31354c6e542fbf4658964882bdd2591935e36f6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index f82eada..9f524dc 100755 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -3712,6 +3712,17 @@ bool Controller::RemoveText( int cursorOffset, } } + // If the number of current text and the number of characters to be deleted are same, + // it means all texts should be removed and all Preedit variables should be initialized. + if( ( currentText.Count() - numberOfCharacters == 0 ) && ( cursorIndex == 0 ) ) + { + if( mImpl->mEventData ) + { + mImpl->mEventData->mPreEditStartPosition = 0; + mImpl->mEventData->mPreEditLength = 0; + } + } + // Updates the text style runs by removing characters. Runs with no characters are removed. mImpl->mModel->mLogicalModel->UpdateTextStyleRuns( cursorIndex, -numberOfCharacters );