summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-04-18 09:34:46 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-04-26 11:32:46 -0700
commitfcd5eb755b7c97ae157ab860f284a9716d549555 (patch)
tree218ad0d1261d148bbc8ccb2bbba227cf7a78c9d3 /src/lib/ecore
parentd9d5846db68f19c17af444e3485f5f0d4f3cd35f (diff)
ecore: allow multiple Efl.ViewModel of the same source thanks to new infrastructure.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8657
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_view_model.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/ecore/efl_view_model.c b/src/lib/ecore/efl_view_model.c
index 7bb9a34673..dd3fefaba1 100644
--- a/src/lib/ecore/efl_view_model.c
+++ b/src/lib/ecore/efl_view_model.c
@@ -350,19 +350,14 @@ _efl_view_model_parent_data(Efl_View_Model *child, Efl_View_Model_Data *ppd)
350static Efl_View_Model * 350static Efl_View_Model *
351_efl_view_model_child_lookup(Efl_View_Model_Data *pd, Efl_Object *parent, Efl_Model *view) 351_efl_view_model_child_lookup(Efl_View_Model_Data *pd, Efl_Object *parent, Efl_Model *view)
352{ 352{
353 Efl_View_Model *co; 353 EFL_COMPOSITE_LOOKUP_RETURN(co, parent, view, "_efl.view_model");
354
355 co = efl_key_wref_get(view, "_efl.view_model");
356 if (co) return co;
357 354
358 co = efl_add(EFL_VIEW_MODEL_CLASS, parent, 355 co = efl_add(EFL_VIEW_MODEL_CLASS, parent,
359 efl_ui_view_model_set(efl_added, view), 356 efl_ui_view_model_set(efl_added, view),
360 _efl_view_model_parent_data(efl_added, pd)); 357 _efl_view_model_parent_data(efl_added, pd));
361 if (!co) return NULL; 358 if (!co) return NULL;
362 359
363 efl_key_wref_set(view, "_efl.view_model", co); 360 EFL_COMPOSITE_REMEMBER_RETURN(co, view);
364
365 return co;
366} 361}
367 362
368static void 363static void