Merge "Ensure cursor positioned at end of selection when focus restored" into devel...
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 20 Aug 2015 13:50:04 +0000 (06:50 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 20 Aug 2015 13:50:04 +0000 (06:50 -0700)
dali-toolkit/internal/text/text-controller-impl.cpp

index 7dd88e4..67eb294 100644 (file)
@@ -1053,6 +1053,9 @@ void Controller::Impl::RepositionSelectionHandles( CharacterIndex selectionStart
 
   mEventData->mDecorator->SetPosition( RIGHT_SELECTION_HANDLE, secondaryPosition.x, secondaryPosition.y, secondaryCursorInfo.lineHeight );
 
+  // Cursor to be positioned at end of selection so if selection interrupted and edit mode restarted the cursor will be at end of selection
+  mEventData->mPrimaryCursorPosition = (indicesSwapped)?mEventData->mLeftSelectionPosition:mEventData->mRightSelectionPosition;
+
   // Set the flag to update the decorator.
   mEventData->mDecoratorUpdated = true;
 }