summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elc_naviframe.c
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-09-06 20:04:41 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-09-06 20:35:38 +0900
commit68b6a8f29f0d43f17a1d39f74764cf7b7a24dda8 (patch)
tree4321a381c47ee7e44b5e05c48466f2c882be5624 /src/lib/elementary/elc_naviframe.c
parent26bacce0fd117896be65ebd75db4fed433529bd1 (diff)
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.
Diffstat (limited to 'src/lib/elementary/elc_naviframe.c')
-rw-r--r--src/lib/elementary/elc_naviframe.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index cd53e7a..9f4f425 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -622,16 +622,23 @@ end:
622 // make sure there is no more reference to this item. 622 // make sure there is no more reference to this item.
623 EINA_LIST_FOREACH(sd->ops, l, nfo) 623 EINA_LIST_FOREACH(sd->ops, l, nfo)
624 { 624 {
625 /* If an transition is cancelled by deleting an item, then the pair 625 /* If an item is newly pushed and then deleted by elm_object_item_del()
626 * transition also should be cancelled. 626 * before item push transition is not started, then the item push
627 * This case can happen when an item is deleted by elm_object_item_del() 627 * transitions for both new item and current item should be cancelled.
628 * right after the item is newly pushed. 628 * Otherwise, the current item becomes invisible due to the item push
629 */ 629 * transition. */
630 if ((nfo->self == nit) || (nfo->related == nit)) 630 if ((nit->pushing) && (nfo->self == nit))
631 { 631 {
632 nfo->self = NULL; 632 nfo->self = NULL;
633 nfo->related = NULL; 633 nfo->related = NULL;
634 } 634 }
635 else
636 {
637 if (nfo->self == nit)
638 nfo->self = NULL;
639 if (nfo->related == nit)
640 nfo->related = NULL;
641 }
635 } 642 }
636 643
637 _item_free(nit); 644 _item_free(nit);