From 24279a886ad9ae76add5295ae047170a42d479dc Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 6 Mar 2018 17:28:16 +0000 Subject: [PATCH] [4.0] Fix the issue that GetHeightForWidth returns wrong height after calling GetTextDirection Change-Id: If60c7bc18be5d8b7083e70b362c2f69a32a42df8 --- dali-toolkit/internal/text/text-controller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index aa0e123..a48c093 100755 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -2140,7 +2140,8 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection() if ( mImpl->mUpdateTextDirection ) { // Operations that can be done only once until the text changes. - const OperationsMask onlyOnceOperations = static_cast( GET_SCRIPTS | + const OperationsMask onlyOnceOperations = static_cast( CONVERT_TO_UTF32 | + GET_SCRIPTS | VALIDATE_FONTS | GET_LINE_BREAKS | GET_WORD_BREAKS | @@ -2161,6 +2162,9 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection() LAYOUT | REORDER | UPDATE_DIRECTION ), naturalSize.GetVectorXY() ); + // Do not do again the only once operations. + mImpl->mOperationsPending = static_cast( mImpl->mOperationsPending & ~onlyOnceOperations ); + // Clear the update info. This info will be set the next time the text is updated. mImpl->mTextUpdateInfo.Clear(); -- 2.7.4