raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0cc2b7351470bc9a1ad62e807a46d5cdd68cb4bb
commit 0cc2b7351470bc9a1ad62e807a46d5cdd68cb4bb Author: kabeer khan <kabeer.k...@samsung.com> Date: Wed Apr 22 13:24:19 2015 +0900 elm_photocam: Fixed T2337, zoom in/out rotated photocam image Summary: Currently zoom in/out rotated or flipped image was causing lost of orientation and aspect of image is also changed. Fixed that by reloading image on pan_obj on zoom @fix Signed-off-by: kabeer khan <kabeer.k...@samsung.com> Reviewers: DaveMDS, jpeg, cedric, raster Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D2381 --- src/lib/elm_photocam.c | 9 +++++++++ src/lib/elm_widget_photocam.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c index a05a96f..96e98af 100644 --- a/src/lib/elm_photocam.c +++ b/src/lib/elm_photocam.c @@ -728,6 +728,13 @@ _zoom_do(Evas_Object *obj, sd->show.w = ow; sd->show.h = oh; + if (sd->orientation_changed) + { + evas_object_smart_member_del(sd->img); + elm_widget_sub_object_del(obj, sd->img); + evas_object_smart_member_add(sd->img, sd->pan_obj); + elm_widget_sub_object_add(obj, sd->img); + } ecore_job_del(sd->calc_job); sd->calc_job = ecore_job_add(_calc_job_cb, obj); if (t >= 1.0) @@ -1296,6 +1303,7 @@ _elm_photocam_image_orient_set(Eo *obj, Elm_Photocam_Data *sd, Evas_Image_Orient if (sd->orient == orient) return; + sd->orientation_changed = EINA_TRUE; sd->orient = orient; g = _grid_create(obj); if (g) @@ -1543,6 +1551,7 @@ _internal_file_set(Eo *obj, Elm_Photocam_Data *sd, const char *file, Eina_File * sd->zoom = 0.0; elm_photocam_zoom_set(obj, tz); sd->orient = EVAS_IMAGE_ORIENT_NONE; + sd->orientation_changed = EINA_FALSE; if (ret) *ret = evas_object_image_load_error_get(sd->img); } diff --git a/src/lib/elm_widget_photocam.h b/src/lib/elm_widget_photocam.h index 0b8577f..b255ec1 100644 --- a/src/lib/elm_widget_photocam.h +++ b/src/lib/elm_widget_photocam.h @@ -130,6 +130,7 @@ struct _Elm_Photocam_Data Eina_Bool resized : 1; Eina_Bool on_hold : 1; Eina_Bool paused : 1; + Eina_Bool orientation_changed : 1; }; struct _Elm_Photocam_Pan_Data --