From 2e57a90c34253d580feb1ff6c4e6093b661ec15e Mon Sep 17 00:00:00 2001 From: woohyun Date: Mon, 12 Mar 2012 05:35:25 +0000 Subject: [PATCH] edje/edje_entry : fix a bug about selelction with arrow keys + page up/down. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@69218 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_entry.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/edje_entry.c b/src/lib/edje_entry.c index bcda2c9..f94883f 100644 --- a/src/lib/edje_entry.c +++ b/src/lib/edje_entry.c @@ -1197,10 +1197,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,up", rp->part->name); _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); } @@ -1217,10 +1217,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,down", rp->part->name); _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); } @@ -1237,8 +1237,8 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,left", rp->part->name); _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; @@ -1256,8 +1256,8 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,right", rp->part->name); _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; @@ -1474,8 +1474,8 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,pgup", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } @@ -1490,8 +1490,8 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); + else _sel_clear(en->cursor, rp->object, en); } - _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,pgdn", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } -- 2.7.4