jaehyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68b6a8f29f0d43f17a1d39f74764cf7b7a24dda8

commit 68b6a8f29f0d43f17a1d39f74764cf7b7a24dda8
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Wed Sep 6 20:04:41 2017 +0900

    naviframe: Fix to finish transition for newly pushed item
    
    Suppose naviframe top item is "A" and a new item "B" is newly pushed.
    In this case, if "A" is deleted by elm_object_item_del() before
    transition for "B" is started, then signal for "B" is also not sent and
    "B" does not become visible.
    
    The above issue happened if the transition effect was implemented by
    using deferred signals (i.e. "pushed,deferred" and "popped,deferred").
    
    To resolve the above issue, the signal only for the deleted item is not
    sent.
    
    Suppose naviframe top item is "A" and a new item "B" is newly pushed.
    In this case, if "B" is deleted by elm_object_item_del() before
    transition for "B" is started, then signal for "A" is still sent and "A"
    becomes invisible.
    
    To resolve the above issue, if the deleted item is the top item and it
    is in the middle of item push, then all the signals related to the
    deleted item are not sent.
---
 src/lib/elementary/elc_naviframe.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elc_naviframe.c 
b/src/lib/elementary/elc_naviframe.c
index cd53e7aebe..9f4f425c78 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -622,16 +622,23 @@ end:
    // make sure there is no more reference to this item.
    EINA_LIST_FOREACH(sd->ops, l, nfo)
      {
-        /* If an transition is cancelled by deleting an item, then the pair
-         * transition also should be cancelled.
-         * This case can happen when an item is deleted by 
elm_object_item_del()
-         * right after the item is newly pushed.
-         */
-        if ((nfo->self == nit) || (nfo->related == nit))
+        /* If an item is newly pushed and then deleted by elm_object_item_del()
+         * before item push transition is not started, then the item push
+         * transitions for both new item and current item should be cancelled.
+         * Otherwise, the current item becomes invisible due to the item push
+         * transition. */
+        if ((nit->pushing) && (nfo->self == nit))
           {
              nfo->self = NULL;
              nfo->related = NULL;
           }
+        else
+          {
+             if (nfo->self == nit)
+               nfo->self = NULL;
+             if (nfo->related == nit)
+               nfo->related = NULL;
+          }
      }
 
    _item_free(nit);

-- 


Reply via email to