Text - Fix for text's cursor position.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index 5a82cc9..714a154 100644 (file)
@@ -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 ) )