jaehyun pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=160f67223286dbabf95f35b43e26556ac2699ef6
commit 160f67223286dbabf95f35b43e26556ac2699ef6 Author: Taehyub Kim <taehyub....@samsung.com> Date: Tue Aug 2 22:34:15 2016 +0900 envnetor_smart: keep the each view size Summary: when group is changed, view information should be updated Test Plan: 1. launch enventor 2. run group template 3. change the view size 4. change the group 5. change the view size 6. change the group to firxt 7. see the result Reviewers: Hermet, NikaWhite, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D4207 --- src/bin/main.c | 12 ++++++++---- src/lib/enventor_smart.c | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/bin/main.c b/src/bin/main.c index 9f8ff57..b1b1b59 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -447,16 +447,20 @@ enventor_live_view_resized_cb(void *data EINA_UNUSED, { Enventor_Live_View_Size *size = event_info; stats_view_size_update(size->w, size->h); - config_view_size_set(size->w, size->h); } static void enventor_live_view_loaded_cb(void *data EINA_UNUSED, Enventor_Object *obj, void *event_info EINA_UNUSED) { - Evas_Coord w, h; - config_view_size_get(&w, &h); - enventor_object_live_view_size_set(obj, w, h); + Evas_Coord view_w, view_h; + enventor_object_live_view_size_get(obj, &view_w, &view_h); + if (!view_w && !view_h) + { + Evas_Coord w, h; + config_view_size_get(&w, &h); + enventor_object_live_view_size_set(obj, w, h); + } base_edc_navigator_group_update(); } diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c index 04ef34d..951c630 100644 --- a/src/lib/enventor_smart.c +++ b/src/lib/enventor_smart.c @@ -139,7 +139,23 @@ edit_view_sync_cb(void *data, Eina_Stringshare *state_name, double state_value, if (pd->group_name != group_name) { view_data *vd = edj_mgr_view_get(group_name); - if (vd) edj_mgr_view_switch_to(vd); + if (vd) + { + edj_mgr_view_switch_to(vd); + + Evas_Coord prev_w, prev_h; + view_data *prev_vd = edj_mgr_view_get(pd->group_name); + view_size_get(prev_vd, &prev_w, &prev_h); + + static Enventor_Live_View_Size size; + view_size_get(vd, &size.w, &size.h); + if (size.w && size.h && + ((size.w != prev_w) || (size.h != prev_h))) + { + evas_object_smart_callback_call(pd->obj, + SIG_LIVE_VIEW_RESIZED, &size); + } + } else { vd = edj_mgr_view_new(it, group_name); --