summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:31:17 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:04 -0400
commitf65ffd257b60045fc9adf61498457209847f019b (patch)
tree1b24470448011ee6ed1eb90ee2cd08eea715240c
parent3ef9e5ac4c85f7701f312b2cc83aa6f8919d3041 (diff)
elm/map: move setting initial zoom to later in construction
Summary: this ensures that all necessary objects exist in order to successfully perform the zoom @fix Depends on D8999 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9000
-rw-r--r--src/lib/elementary/elm_map.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 7c0229b0df..ab6da777d0 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -1159,16 +1159,13 @@ _zoom_do(Elm_Map_Data *sd,
1159 ecore_timer_del(sd->zoom_timer); 1159 ecore_timer_del(sd->zoom_timer);
1160 sd->zoom_timer = NULL; 1160 sd->zoom_timer = NULL;
1161 } 1161 }
1162 else if (sd->obj) 1162 else
1163 efl_event_callback_legacy_call 1163 efl_event_callback_legacy_call
1164 (sd->obj, EFL_UI_EVENT_ZOOM_START, NULL); 1164 (sd->obj, EFL_UI_EVENT_ZOOM_START, NULL);
1165 1165
1166 if (sd->obj) 1166 sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj);
1167 { 1167 efl_event_callback_legacy_call
1168 sd->zoom_timer = ecore_timer_add(0.25, _zoom_timeout_cb, sd->obj); 1168 (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL);
1169 efl_event_callback_legacy_call
1170 (sd->obj, EFL_UI_EVENT_ZOOM_CHANGE, NULL);
1171 }
1172 1169
1173 efl_event_callback_legacy_call 1170 efl_event_callback_legacy_call
1174 (sd->pan_obj, ELM_PAN_EVENT_CHANGED, NULL); 1171 (sd->pan_obj, ELM_PAN_EVENT_CHANGED, NULL);
@@ -4184,8 +4181,6 @@ _elm_map_efl_canvas_group_group_add(Eo *obj, Elm_Map_Data *priv)
4184 id_num++; 4181 id_num++;
4185 _grid_all_create(priv); 4182 _grid_all_create(priv);
4186 4183
4187 _zoom_do(priv, 0);
4188
4189 priv->mode = EFL_UI_ZOOM_MODE_MANUAL; 4184 priv->mode = EFL_UI_ZOOM_MODE_MANUAL;
4190 4185
4191 if (!elm_need_efreet()) 4186 if (!elm_need_efreet())
@@ -4322,6 +4317,7 @@ _elm_map_efl_object_constructor(Eo *obj, Elm_Map_Data *sd)
4322 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 4317 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
4323 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_IMAGE_MAP); 4318 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_IMAGE_MAP);
4324 legacy_object_focus_handle(obj); 4319 legacy_object_focus_handle(obj);
4320 _zoom_do(sd, 0);
4325 4321
4326 return obj; 4322 return obj;
4327} 4323}