elm_widget: Fix order of operations (isa before data_get)

This fixes some of the occurences of the following error message
when using eo_debug:

ERR<23101>:eo /home/jpeg/e/core/efl/src/lib/eo/eo.c:1955
  efl_data_scope_get() Tried getting data of class 'Elm.Widget'
  from object of class 'Edje.Object', but the former is not a
  direct inheritance of the latter.

If we're going to call efl_isa, then let's at least do it before
efl_data_scope_get.
This commit is contained in:
Jean-Philippe Andre 2017-02-15 13:32:15 +09:00
parent 2bc44b055e
commit c23ae314a4
1 changed files with 14 additions and 11 deletions

View File

@ -27,8 +27,10 @@
Elm_Widget_Smart_Data *wd = efl_data_scope_get(o, MY_CLASS)
#define API_ENTRY \
ELM_WIDGET_DATA_GET(obj, sd); \
if ((!sd) || (!_elm_widget_is(obj)))
Elm_Widget_Smart_Data *sd = NULL; \
if (!_elm_widget_is(obj) || \
(!(sd = efl_data_scope_get(obj, MY_CLASS))))
#define INTERNAL_ENTRY \
ELM_WIDGET_DATA_GET(obj, sd); \
if (!sd) return
@ -3141,15 +3143,16 @@ _elm_widget_disabled_eval(const Evas_Object *obj, Eina_Bool disabled)
else
{
EINA_LIST_FOREACH(sd->subobjs, l, child)
{
ELM_WIDGET_DATA_GET(child, sdc);
if (elm_widget_is(child) && !sdc->disabled)
{
elm_widget_focus_disabled_handle(child);
elm_obj_widget_disable(child);
_elm_widget_disabled_eval(child, EINA_FALSE);
}
}
if (elm_widget_is(child))
{
ELM_WIDGET_DATA_GET(child, sdc);
if (!sdc->disabled)
{
elm_widget_focus_disabled_handle(child);
elm_obj_widget_disable(child);
_elm_widget_disabled_eval(child, EINA_FALSE);
}
}
}
}