From db6ae061c3e1939a4525579d215b5edbd352ac88 Mon Sep 17 00:00:00 2001 From: Kamil Konieczny Date: Wed, 23 Sep 2020 15:00:27 +0200 Subject: [PATCH] [AT-SPI] TextController: emit characters before delete Deleted characters should be emitted to ATSPI before erase, otherwise the characters following the deleted characters will be emitted. Change-Id: I915c239e47cb809ff6204e690d4bc9da952f17bf --- dali-toolkit/internal/text/text-controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index d683c7f..3035062 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -2648,8 +2648,6 @@ bool Controller::RemoveText( int cursorOffset, Vector::Iterator first = currentText.Begin() + cursorIndex; Vector::Iterator last = first + numberOfCharacters; - currentText.Erase( first, last ); - if( NULL != mImpl->mEditableControlInterface ) { std::string utf8; @@ -2657,6 +2655,8 @@ bool Controller::RemoveText( int cursorOffset, mImpl->mEditableControlInterface->TextDeleted( cursorIndex, numberOfCharacters, utf8 ); } + currentText.Erase( first, last ); + // Cursor position retreat oldCursorIndex = cursorIndex; -- 2.7.4