[TSAM-11649] Saving scroller position before update 98/105098/2
authorRahul Dadhich <r.dadhich@samsung.com>
Thu, 15 Dec 2016 11:05:26 +0000 (16:35 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Thu, 15 Dec 2016 11:07:47 +0000 (16:37 +0530)
Change-Id: Id8e31393072a1341daf39c6965a17c441922767c
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
src/2dview/gl-timeline.c

index d38317c062a69fe7f050f3a3af3237155ca5fd7d..21b08460ce75c7dddb496fae583f0d6fec81aa8a 100644 (file)
@@ -2554,11 +2554,22 @@ int _gl_timeline_update_view(void *data)
        if (_gl_check_no_content_view(data)) {
                return 0;
        }
+       if (ad->tlinfo->view) {
+               _gl_ui_save_scroller_pos(ad->tlinfo->view);
+       }
+       Evas_Coord x = (Evas_Coord) evas_object_data_get(ad->tlinfo->view, "prev_scroller_x");
+       Evas_Coord y = (Evas_Coord) evas_object_data_get(ad->tlinfo->view, "prev_scroller_y");
+       Evas_Coord w = (Evas_Coord) evas_object_data_get(ad->tlinfo->view, "prev_scroller_w");
+       Evas_Coord h = (Evas_Coord) evas_object_data_get(ad->tlinfo->view, "prev_scroller_h");
+       gl_dbg("(%dx%d), (%dx%d)", x, y, w, h);
        Evas_Object *view = __gl_timeline_create_list_view(ad->tlinfo, false);
        if (view == NULL) {
                gl_dbgE("Failed to create view!");
                return -1;
        }
+       if (w > 0 && h > 0) {
+               elm_scroller_region_show(view, x, y, w, h);
+       }
        ad->tlinfo->view = view;
        elm_object_part_content_set(ad->tlinfo->layout, "elm.swallow", view);