From 738b558ead1ec060d9cd758ad8437991818f0cc7 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 7 Dec 2016 10:42:36 +0000 Subject: [PATCH] Text - Fix for text's cursor position. * The control's size stored in the view-model is not updated when the text is void. If the text's alignment is not BEGIN, the cursor position is calculated badly. Change-Id: I65f6c520268608ad1605fc2d0b70be96377bb9dd Signed-off-by: Victor Cebollada --- dali-toolkit/internal/text/text-controller.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 5a82cc9..714a154 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1508,6 +1508,9 @@ Controller::UpdateTextType Controller::Relayout( const Size& size ) // Set the update info to relayout the whole text. mImpl->mTextUpdateInfo.mFullRelayoutNeeded = true; mImpl->mTextUpdateInfo.mCharacterIndex = 0u; + + // Store the size used to layout the text. + mImpl->mModel->mVisualModel->mControlSize = size; } // Whether there are modify events. @@ -2664,9 +2667,6 @@ bool Controller::DoRelayout( const Size& size, mImpl->mModel->mVisualModel->SetLayoutSize( layoutSize ); } } // view updated - - // Store the size used to layout the text. - mImpl->mModel->mVisualModel->mControlSize = size; } if( NO_OPERATION != ( ALIGN & operations ) ) -- 2.7.4