GetLineCount() after GetTextDirection() returns wrong value.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index 44a6788..139fbfd 100755 (executable)
@@ -399,6 +399,13 @@ void Controller::SetHorizontalAlignment( Text::HorizontalAlignment::Type alignme
     if( mImpl->mEventData )
     {
       mImpl->mEventData->mUpdateAlignment = true;
+
+      // Update the cursor if it's in editing mode
+      if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+      {
+        mImpl->ChangeState( EventData::EDITING );
+        mImpl->mEventData->mUpdateCursorPosition = true;
+      }
     }
 
     mImpl->RequestRelayout();
@@ -2452,6 +2459,9 @@ Toolkit::DevelText::TextDirection::Type Controller::GetTextDirection()
     // Clear the update info. This info will be set the next time the text is updated.
     mImpl->mTextUpdateInfo.Clear();
 
+    // FullRelayoutNeeded should be true because DoRelayout is MAX_FLOAT, MAX_FLOAT.
+    mImpl->mTextUpdateInfo.mFullRelayoutNeeded = true;
+
     mImpl->mUpdateTextDirection = false;
   }