Add TextField BACKGROUND property and more Preedit style options
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index 9d56a0e..0407147 100755 (executable)
@@ -2143,7 +2143,7 @@ bool Controller::CheckForTextFit( float pointSize, Size& layoutSize )
 void Controller::FitPointSizeforLayout( Size layoutSize )
 {
   const OperationsMask operations  = mImpl->mOperationsPending;
-  if( NO_OPERATION != ( UPDATE_LAYOUT_SIZE & operations ) )
+  if( NO_OPERATION != ( UPDATE_LAYOUT_SIZE & operations ) || mImpl->mTextFitContentSize != layoutSize )
   {
     bool actualellipsis = mImpl->mModel->mElideEnabled;
     float minPointSize = mImpl->mTextFitMinSize;
@@ -3714,11 +3714,7 @@ bool Controller::RemoveText( int cursorOffset,
       // it means all texts should be removed and all Preedit variables should be initialized.
       if( ( currentText.Count() - numberOfCharacters == 0 ) && ( cursorIndex == 0 ) )
       {
-        if( mImpl->mEventData )
-        {
-          mImpl->mEventData->mPreEditStartPosition = 0;
-          mImpl->mEventData->mPreEditLength = 0;
-        }
+        mImpl->ClearPreEditFlag();
       }
 
       // Updates the text style runs by removing characters. Runs with no characters are removed.