From: Victor Cebollada Date: Wed, 7 Dec 2016 10:42:36 +0000 (+0000) Subject: Text - Fix for text's cursor position. X-Git-Tag: dali_1.2.18~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=738b558ead1ec060d9cd758ad8437991818f0cc7;ds=sidebyside 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 --- 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 ) )