Fix multiline text size issue in label
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller-relayouter.cpp
index 8aba938..d323bd8 100644 (file)
@@ -99,6 +99,13 @@ Size Controller::Relayouter::CalculateLayoutSizeOnRequiredControllerSize(Control
 
   if(!isEditable)
   {
+    if(NO_OPERATION != (VALIDATE_FONTS & operationsPending) &&
+       textUpdateInfo.mCharacterIndex == static_cast<CharacterIndex>(-1))
+    {
+      impl.ClearFontData();
+      updateInfoCharIndexBackup = textUpdateInfo.mCharacterIndex;
+    }
+
     impl.UpdateModel(onlyOnceOperations);
 
     // Layout the text for the new width.