[JIRA:TT-25] Focus of CContextView is remained even if CPlaybackView is shown 05/36405/1 accepted/tizen/tv/20150306.071121 submit/tizen_tv/20150306.051853
authorKim Tae Soo <taesoo46.kim@samsung.com>
Fri, 6 Mar 2015 05:16:42 +0000 (14:16 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Fri, 6 Mar 2015 05:16:42 +0000 (14:16 +0900)
Change-Id: Icfb0f67c37f89c090d94e39359cf4057ea5ddc91
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/playback-view.cpp

index 538fc67..e062b9b 100644 (file)
@@ -293,13 +293,21 @@ void CPlaybackView::sm_CbCtxtUpdate(void *dt, enum EActionType type, int lid)
                                m->parent->m_HandleGenlistItemActivated(m->eoPlaylist, itinfo->item);
                }
        }
-       else
+       else {
                _ERR(" Wrong ctxt add type in plaback view ");
+               ASSERT(0);
+       }
+
+       if (!m->mgr->PopView()) {
+               _ERR("CViewMgr::PopView failed");
+               return;
+       }
 
        if (!m->mgr->PushView(MUSIC_PLAYBACK_VIEW, NULL)) {
-               _ERR(" viewmgr show failed ");
+               _ERR("CViewMgr::PushView failed");
                return;
        }
+
        elm_object_item_focus_set(m->focused_item, EINA_TRUE);
 }
 
@@ -311,8 +319,16 @@ void CPlaybackView::sm_CbCtxtClose(void *dt)
        if (!m)
                return;
 
-       m->mgr->PopView();
-       m->mgr->PushView(MUSIC_PLAYBACK_VIEW, NULL);
+       if (!m->mgr->PopView()) {
+               _ERR("CViewMgr::PopView failed");
+               return;
+       }
+
+       if (!m->mgr->PushView(MUSIC_PLAYBACK_VIEW, NULL)) {
+               _ERR("CViewMgr::PushView failed");
+               return;
+       }
+
        elm_object_item_focus_set(m->focused_item, EINA_TRUE);
 }