forked from enlightenment/efl
elementary/elm_entry.c : theme,changed smart callback can move the cursor position ! Thanks Daniel~
This commit is contained in:
parent
de46dc5cd8
commit
b8000c98cd
|
@ -521,14 +521,13 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list)
|
|||
edje_object_part_text_input_panel_return_key_disabled_set
|
||||
(sd->entry_edje, "elm.text", sd->input_panel_return_key_disabled);
|
||||
|
||||
// elm_entry_cursor_pos_set -> cursor,changed -> widget_show_region_set
|
||||
// -> smart_objects_calculate will call all smart calculate functions,
|
||||
// and one of them can delete elm_entry.
|
||||
evas_object_ref(obj);
|
||||
|
||||
if (sd->cursor_pos != 0)
|
||||
{
|
||||
// elm_entry_cursor_pos_set -> cursor,changed -> widget_show_region_set
|
||||
// -> smart_objects_calculate will call all smart calculate functions,
|
||||
// and one of them can delete elm_entry.
|
||||
evas_object_ref(obj);
|
||||
elm_entry_cursor_pos_set(obj, sd->cursor_pos);
|
||||
}
|
||||
elm_entry_cursor_pos_set(obj, sd->cursor_pos);
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
|
||||
|
@ -570,8 +569,7 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list)
|
|||
|
||||
evas_object_smart_callback_call(obj, SIG_THEME_CHANGED, NULL);
|
||||
|
||||
if (sd->cursor_pos != 0)
|
||||
evas_object_unref(obj);
|
||||
evas_object_unref(obj);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue