void NaviFrameView::create(Evas_Object *parent)
{
setEo(elm_naviframe_add(parent));
- elm_naviframe_event_enabled_set(getEo(), true); // Remove it after fix: TSAM-6776
addSmartCb("transition,finished", SMART_CALLBACK(NaviFrameView, onTransitionFinished), this);
show();
}
void NaviFrameView::pop()
{
- m_TransitionStatus = getItemsCount() > 1;
- elm_naviframe_item_pop(getEo());
+ auto *topFrame = getTopFrame();
+ if(topFrame)
+ pop(*topFrame);
}
void NaviFrameView::pop(NaviFrameItem &item)
{
- pop();
- // Uncomment it after fix: TSAM-6776
- /* if(getTransitionStatus())
- item.destroy();
+ // Workaround solution to avoid rejected JIRA issue: http://suprem.sec.samsung.net/jira/browse/TSAM-6776
+ if(getTransitionStatus())
+ {
+ m_ItemsToDelete.push_back(&item);
+ }
else
- pop();
- */
+ {
+ if(getTopFrame() == &item)
+ {
+ m_TransitionStatus = getItemsCount() > 1;
+ elm_naviframe_item_pop(getEo());
+ }
+ else
+ {
+ item.destroy();
+ }
+ }
}
void NaviFrameView::insertToBottom(NaviFrameItem &item)
Elm_Object_Item *insert = nullptr;
if(before)
+ {
insert = elm_naviframe_item_insert_before(getEo(), before, nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
+ }
else
+ {
+ m_TransitionStatus = !isEmpty();
insert = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, nullptr, naviTitleStyleEmpty);
+ }
item.setElmObjItem(insert);
}
{
MSG_LOG("");
m_TransitionStatus = false;
- auto *item = ViewItem::staticCast<NaviFrameItem*>(eventInfo);
- if(item)
- item->onTransitionFinished(*item);
+
+ auto *transFinishedItem = ViewItem::staticCast<NaviFrameItem*>(eventInfo);
+
+ for(NaviFrameItem *item: m_ItemsToDelete)
+ {
+ if(item == transFinishedItem)
+ transFinishedItem = nullptr;
+ item->destroy();
+ }
+ m_ItemsToDelete.clear();
+
+ if(transFinishedItem)
+ transFinishedItem->onTransitionFinished(*transFinishedItem);
}
bool NaviFrameView::getTransitionStatus() const