Fix SetPrimaryCursorPosition issue 41/263641/1
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 7 Sep 2021 07:57:32 +0000 (16:57 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 7 Sep 2021 07:57:32 +0000 (16:57 +0900)
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 <bowon.ryu@samsung.com>
dali-toolkit/internal/text/text-controller-impl.cpp

index d810928..b298bf0 100644 (file)
@@ -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;