From 4108286b6b76faed826d2df1106c03b2249a681a Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Thu, 13 Dec 2018 11:38:05 +0900 Subject: [PATCH] [Tizen] If ellipsis is true. then we should used index first position. If ellipsis is true, the characterIndex value is changed. bool EllipsisLine () { ... lineRun-> characterRun.characterIndex = ellipsisLayout.characterIndex; } In GetLineOfCharacter (), the line index we want is 0, but another value is returned. ex) index = 1; The lineRun.alignmentOffset value obtained through the wrong line index may be wrong. Ex) lineRun.alignmentOffset: 16312432575010308096 So if ellipsis is true. then we should used index first position. Change-Id: I7912e1ea6f94cc53c272ba7bf424f07a1174af20 --- dali-toolkit/internal/text/visual-model-impl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/visual-model-impl.cpp b/dali-toolkit/internal/text/visual-model-impl.cpp index bd567a4..80f7291 100755 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -278,7 +278,13 @@ LineIndex VisualModel::GetLineOfCharacter( CharacterIndex characterIndex ) return mCachedLineIndex; } - // 3) Is not in the cached line. Check in the other lines. + // 3) if ellipsis is true. then we should used index first position. + if( lineRun.ellipsis ) + { + return 0u; + } + + // 4) Is not in the cached line or ellipsis. Check in the other lines. LineIndex index = characterIndex < lineRun.characterRun.characterIndex ? 0u : mCachedLineIndex + 1u; for( Vector::ConstIterator it = mLines.Begin() + index, -- 2.7.4