Fix the issue that GetHeightForWidth returns wrong height after calling GetTextDirection 99/171699/1
authorRichard Huang <r.huang@samsung.com>
Tue, 6 Mar 2018 17:28:16 +0000 (17:28 +0000)
committerRichard Huang <r.huang@samsung.com>
Tue, 6 Mar 2018 17:28:16 +0000 (17:28 +0000)
Change-Id: If60c7bc18be5d8b7083e70b362c2f69a32a42df8

dali-toolkit/internal/text/text-controller.cpp

index b18767b..f47b526 100755 (executable)
@@ -2164,7 +2164,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<OperationsMask>( GET_SCRIPTS       |
+    const OperationsMask onlyOnceOperations = static_cast<OperationsMask>( CONVERT_TO_UTF32  |
+                                                                           GET_SCRIPTS       |
                                                                            VALIDATE_FONTS    |
                                                                            GET_LINE_BREAKS   |
                                                                            GET_WORD_BREAKS   |
@@ -2185,6 +2186,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<OperationsMask>( mImpl->mOperationsPending & ~onlyOnceOperations );
+
     // Clear the update info. This info will be set the next time the text is updated.
     mImpl->mTextUpdateInfo.Clear();