Merge "Fix BackgroundImage and BackgroudColor properties in C# View" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 8 Mar 2017 18:10:59 +0000 (10:10 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 8 Mar 2017 18:10:59 +0000 (10:10 -0800)
dali-toolkit/internal/text/text-controller-impl.cpp

index 2c1b772..c54ca22 100644 (file)
@@ -1964,15 +1964,15 @@ void Controller::Impl::RepositionSelectionHandles()
     // Whether to retrieve the next line.
     if( index == lastGlyphOfLine )
     {
-      // Retrieve the next line.
-      ++lineRun;
-
-      // Get the last glyph of the new line.
-      lastGlyphOfLine = lineRun->glyphRun.glyphIndex + lineRun->glyphRun.numberOfGlyphs - 1u;
-
       ++lineIndex;
       if( lineIndex < firstLineIndex + numberOfLines )
       {
+        // Retrieve the next line.
+        ++lineRun;
+
+        // Get the last glyph of the new line.
+        lastGlyphOfLine = lineRun->glyphRun.glyphIndex + lineRun->glyphRun.numberOfGlyphs - 1u;
+
         // Keep the offset and height of the current selection box.
         const float currentLineOffset = selectionBoxInfo->lineOffset;
         const float currentLineHeight = selectionBoxInfo->lineHeight;