When the size of the text control is 0,
there is a issue that the mRequestedNumberOfCharacters becomes 0
even if the actural text exists.
This patch avoids this issue by updating mNumberOfCharactersToAdd
in textUpdateInfo in that situation.
Change-Id: I440b39f846aa7c9c410a1d121dae7b8a63b811ae
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
GET_GLYPH_METRICS);
// Set the update info to relayout the whole text.
GET_GLYPH_METRICS);
// Set the update info to relayout the whole text.
- TextUpdateInfo& textUpdateInfo = impl.mTextUpdateInfo;
+ TextUpdateInfo& textUpdateInfo = impl.mTextUpdateInfo;
+ if((0 == textUpdateInfo.mNumberOfCharactersToAdd) &&
+ (0 == textUpdateInfo.mPreviousNumberOfCharacters) &&
+ ((visualModel->mControlSize.width < Math::MACHINE_EPSILON_1000) || (visualModel->mControlSize.height < Math::MACHINE_EPSILON_1000)))
+ {
+ textUpdateInfo.mNumberOfCharactersToAdd = model->mLogicalModel->mText.Count();
+ }
textUpdateInfo.mParagraphCharacterIndex = 0u;
textUpdateInfo.mRequestedNumberOfCharacters = model->mLogicalModel->mText.Count();
textUpdateInfo.mParagraphCharacterIndex = 0u;
textUpdateInfo.mRequestedNumberOfCharacters = model->mLogicalModel->mText.Count();
{
ModelPtr& model = impl.mModel;
{
ModelPtr& model = impl.mModel;
- bool actualellipsis = model->mElideEnabled;
- float minPointSize = impl.mTextFitMinSize;
- float maxPointSize = impl.mTextFitMaxSize;
- float pointInterval = impl.mTextFitStepSize;
+ bool actualellipsis = model->mElideEnabled;
+ float minPointSize = impl.mTextFitMinSize;
+ float maxPointSize = impl.mTextFitMaxSize;
+ float pointInterval = impl.mTextFitStepSize;
float currentFitPointSize = impl.mFontDefaults->mFitPointSize;
model->mElideEnabled = false;
float currentFitPointSize = impl.mFontDefaults->mFitPointSize;
model->mElideEnabled = false;
- model->mElideEnabled = actualellipsis;
+ model->mElideEnabled = actualellipsis;
if(currentFitPointSize != pointSizeArray[bestSizeIndex])
{
impl.mTextFitChanged = true;
if(currentFitPointSize != pointSizeArray[bestSizeIndex])
{
impl.mTextFitChanged = true;