davemds pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6b4bc0516b63d684cc3c21aeb5258ab69b906bd2

commit 6b4bc0516b63d684cc3c21aeb5258ab69b906bd2
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Mon Jan 25 22:17:09 2016 +0100

    Elm Image: fix usage of animated gif on the same image object more than one 
time
    
    This patch @fix this usage example:
    
    0. image obj create
    1. file_set(an animated gif)
    2. animated_set(TRUE) + animated_play_set(TRUE) to make the gif play
    3. file_set(a normal image)
    ... at this point elm_image is confused because it still think that the 
image is animated
    4. file_set(an animated gif)
    5. animated_set(TRUE) + animated_play_set(TRUE) to make the gif play
    ...this now do not work because elm think that the image is already animated
---
 src/lib/elm_image.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 7cb9e1c..34ce7c1 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -1119,6 +1119,13 @@ _elm_image_efl_file_file_set(Eo *obj, Elm_Image_Data 
*sd, const char *file, cons
    if (sd->remote) _elm_url_cancel(sd->remote);
    sd->remote = NULL;
 
+   if (sd->anim)
+     {
+        ELM_SAFE_FREE(sd->anim_timer, ecore_timer_del);
+        sd->play = EINA_FALSE;
+        sd->anim = EINA_FALSE;
+     }
+
    for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i)
      if (file && !strncmp(remote_uri[i], file, strlen(remote_uri[i])))
        {

-- 


Reply via email to