mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 20:18:22 +08:00
fix bug in image_annimation
This commit is contained in:
parent
6c7563351f
commit
d23392603e
@ -116,7 +116,9 @@ static const widget_vtable_t s_image_animation_vtable = {
|
|||||||
|
|
||||||
static ret_t image_animation_delay_play(const timer_info_t* info) {
|
static ret_t image_animation_delay_play(const timer_info_t* info) {
|
||||||
widget_t* widget = WIDGET(info->ctx);
|
widget_t* widget = WIDGET(info->ctx);
|
||||||
|
image_animation_t* image_animation = IMAGE_ANIMATION(widget);
|
||||||
|
|
||||||
|
image_animation->timer_id = TK_INVALID_ID;
|
||||||
image_animation_play(widget);
|
image_animation_play(widget);
|
||||||
|
|
||||||
return RET_REMOVE;
|
return RET_REMOVE;
|
||||||
@ -128,7 +130,7 @@ static ret_t image_animation_on_open(void* ctx, event_t* e) {
|
|||||||
|
|
||||||
if (image_animation->auto_play) {
|
if (image_animation->auto_play) {
|
||||||
if (image_animation->delay > 0) {
|
if (image_animation->delay > 0) {
|
||||||
timer_add(image_animation_delay_play, widget, image_animation->delay);
|
image_animation->timer_id = timer_add(image_animation_delay_play, widget, image_animation->delay);
|
||||||
} else {
|
} else {
|
||||||
image_animation_play(widget);
|
image_animation_play(widget);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user