From 76661f68db94875fe66bfc1d41e58779941cbe91 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 7 Dec 2016 10:42:36 +0000 Subject: [PATCH] [3.0] 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 24dd89c..bc70bed 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1530,6 +1530,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->mVisualModel->mControlSize = size; } // Whether there are modify events. @@ -2679,9 +2682,6 @@ bool Controller::DoRelayout( const Size& size, mImpl->mVisualModel->SetLayoutSize( layoutSize ); } } // view updated - - // Store the size used to layout the text. - mImpl->mVisualModel->mControlSize = size; } if( NO_OPERATION != ( ALIGN & operations ) ) -- 2.7.4