forked from enlightenment/efl
entry: fix clearing selection region problem while it's already selected.
if entry has selection, it would be cleared if selection region set is requested again. because entry cancel the selection area after it reset the selection area. unfortunately, the selection area is new selection so selection area is gone. this patch prevent clearing selection and keep the new selection. @fix
This commit is contained in:
parent
5f5218a5af
commit
c81683ba5a
|
@ -3972,6 +3972,11 @@ _elm_entry_select_region_set(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, int start,
|
||||||
edje_object_signal_emit(sd->entry_edje, "elm,state,select,off", "elm");
|
edje_object_signal_emit(sd->entry_edje, "elm,state,select,off", "elm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set have selection false to not be cleared handler in
|
||||||
|
selection_cleared_signal_cb() since that callback will be called while
|
||||||
|
resetting edje text. */
|
||||||
|
sd->have_selection = EINA_FALSE;
|
||||||
|
|
||||||
edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, start);
|
edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, start);
|
||||||
edje_object_part_text_select_begin(sd->entry_edje, "elm.text");
|
edje_object_part_text_select_begin(sd->entry_edje, "elm.text");
|
||||||
edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, end);
|
edje_object_part_text_cursor_pos_set(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN, end);
|
||||||
|
|
Loading…
Reference in New Issue