efl_ui_animation_view: Set max progress when play back. 02/205302/1
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 2 May 2019 06:43:21 +0000 (15:43 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 2 May 2019 06:43:21 +0000 (15:43 +0900)
Summary:
If we start an animation object with play_back, the current frame is 0 in "start" callback.
Since transit_go is called after "start" callback,
we need to advance the animation start advance to the last progress.

Test Plan: N/A

Reviewers: Hermet, kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8802

Change-Id: Ia93a5d388c0b8a2412bc93068eb33159b978c15c

src/lib/elementary/efl_ui_animation_view.c

index fa0b6d0..146993c 100644 (file)
@@ -492,6 +492,9 @@ _efl_ui_animation_view_play_back(Eo *obj EINA_UNUSED, Efl_Ui_Animation_View_Data
    if (!pd->file) return EINA_FALSE;
    if (!pd->transit && !_ready_play(pd)) return EINA_FALSE;
 
+   if (pd->progress == 0)
+     pd->progress = 1.0;
+
    if (pd->state == EFL_UI_ANIMATION_VIEW_STATE_STOP)
      _transit_go_facade(pd);
    else if (rewind)