fix selection issue in OnCursorKeyEvent 33/263333/2
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 31 Aug 2021 12:08:52 +0000 (21:08 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Fri, 3 Sep 2021 09:07:11 +0000 (18:07 +0900)
commit732a3da45a5fb0ab4327a50e9d725501e8702c2c
treef5de42279717add799a4d987a2dd77ba2c40df1d
parent4946918df0bb894b946175b13529c656893c440a
fix selection issue in OnCursorKeyEvent

Solved the problem when selecting with Shift + Left, Right.

1. Deselect the left == right case.
Previously, the selection handle was drawn even though nothing was selected, which looked weird.

2. For SelectWholeText and SelectText, set PrimaryCursorPosition to RightSelectionPosition.
Selection processing in OnCursorKeyEvent is implemented assuming that the cursor position is RightSelectionPosition.

mPrimaryCursorPosition = mRightSelectionPosition;
This ensures the above behavior.

Change-Id: I1208e37c93e9941319bc1b88502632800129e4d8
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-toolkit/internal/text/text-controller-impl-event-handler.cpp