forked from enlightenment/efl
Elm_Transit: Fix wrong intervention progress value
Summary: If progress_value_set is called more than once, an error value occurs. The intervention progress must use progress that does not apply the previous intervention progress. Test Plan: meson_option.txt -> remove json in evas-loaders-disabler option elementary_test -to "animation view" Click Play -> Play back -> Play Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10907
This commit is contained in:
parent
b9b9287454
commit
74c60b7887
|
@ -61,6 +61,7 @@ struct _Elm_Transit
|
|||
} repeat;
|
||||
double progress;
|
||||
double inter_progress;
|
||||
double base_progress;
|
||||
double revert_begin_progress;
|
||||
double revert_duration;
|
||||
double total_revert_time;
|
||||
|
@ -359,6 +360,7 @@ _transit_animate_cb(void *data)
|
|||
}
|
||||
|
||||
/* Intervention Progress */
|
||||
transit->base_progress = transit->progress;
|
||||
transit->progress += transit->inter_progress;
|
||||
|
||||
switch (transit->tween_mode)
|
||||
|
@ -956,7 +958,7 @@ elm_transit_progress_value_set(Elm_Transit *transit, double progress)
|
|||
if (progress < 0) progress = 0;
|
||||
else if (progress > 1) progress = 1;
|
||||
|
||||
transit->inter_progress = (progress - transit->progress);
|
||||
transit->inter_progress = (progress - transit->base_progress);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
|
|
Loading…
Reference in New Issue