elm_entry: Save cursor position before entry text clear 37/103637/2
authorJEONGHYUN YUN <jh0506.yun@samsung.com>
Fri, 9 Dec 2016 04:32:34 +0000 (13:32 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 12 Dec 2016 08:06:51 +0000 (00:06 -0800)
Summary: Cursor position should be saved because entry will be cleared when entry text set.

Reviewers: woohyun, id213sin

Reviewed By: id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4469

Change-Id: Ia575f7bf82a0f87c4343d0a457bfd4732f2dbb1d
Signed-off-by: JEONGHYUN YUN <jh0506.yun@samsung.com>
src/lib/elm_entry.c

index 9471cf4..71eb70c 100644 (file)
@@ -4483,6 +4483,8 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, co
      }
 
    /* Need to clear the entry first */
+   sd->cursor_pos = edje_object_part_text_cursor_pos_get
+       (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
    edje_object_part_text_set(sd->entry_edje, "elm.text", "");
    _entry_text_append(obj, entry, EINA_TRUE);