eo: when an object is reused, reset the invalidate flag.

This commit is contained in:
Cedric BAIL 2018-03-08 14:59:12 -08:00
parent 7a4669b1b7
commit f1aa23805a
3 changed files with 9 additions and 0 deletions

View File

@ -1022,6 +1022,7 @@ efl_reuse(const Eo *eo_id)
efl_object_override(obj, NULL);
if (!efl_parent_get(obj))
_efl_object_parent_sink_set(obj, EINA_FALSE);
_efl_object_reuse(obj);
#ifdef EO_DEBUG
_eo_log_obj_ref_op(_obj, EO_REF_OP_REUSE);

View File

@ -613,6 +613,13 @@ _efl_object_parent_sink_set(Eo *obj, Eina_Bool sink)
pd->parent_sunk = sink;
}
void
_efl_object_reuse(Eo *obj)
{
Efl_Object_Data *pd = efl_data_scope_get(obj, EFL_OBJECT_CLASS);
pd->invalidate = EINA_FALSE;
}
EOLIAN static void
_efl_object_parent_set(Eo *obj, Efl_Object_Data *pd, Eo *parent_id)
{

View File

@ -218,6 +218,7 @@ typedef struct
void _eo_log_obj_report(const Eo_Id id, int log_level, const char *func_name, const char *file, int line);
void _efl_object_parent_sink_set(Eo *obj, Eina_Bool sink);
void _efl_object_reuse(Eo *obj);
static inline
Eo *_eo_header_id_get(const Eo_Header *header)