elm_dnd: do not register widgets twice

we have to support none widgets, but we should not register widgets
twice because of that.

Differential Revision: https://phab.enlightenment.org/D11877
This commit is contained in:
Marcel Hollerbach 2020-05-18 19:04:43 +02:00
parent 104caf0514
commit 9f7c518a20
1 changed files with 2 additions and 1 deletions

View File

@ -182,7 +182,8 @@ elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
target->format = format;
efl_event_callback_array_add(obj, drop_target_cb(), target);
_drop_event_register(obj); //this is ensuring that we are also supporting none widgets
if (!efl_isa(obj, EFL_UI_WIDGET_CLASS))
_drop_event_register(obj); //this is ensuring that we are also supporting none widgets
if (!target_register)
target_register = eina_hash_pointer_new(NULL);
eina_hash_list_append(target_register, &obj, target);