From a2e89745e6dc47b21b9714de87fc230a67addf5e Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Tue, 7 Sep 2021 16:57:32 +0900 Subject: [PATCH] Fix SetPrimaryCursorPosition issue In SetPrimaryCursorPosition(), case of (mPrimaryCursorPosition == index), nothing happens. But if selection is activated, this should be cancelled. This patch adds a condition to ensure behaviour in selection case. Change-Id: I5a6b2d44948f42850ee001432c6fc85fb8eab274 Signed-off-by: Bowon Ryu --- dali-toolkit/internal/text/text-controller-impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index d810928..b298bf0 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -1260,7 +1260,7 @@ bool Controller::Impl::SetPrimaryCursorPosition(CharacterIndex index, bool focus return false; } - if(mEventData->mPrimaryCursorPosition == index) + if(mEventData->mPrimaryCursorPosition == index && mEventData->mState != EventData::SELECTING) { // Nothing for same cursor position. return false; -- 2.7.4