Fix Bug: When CSortCtxPopup is created, the case of song layout is not considered 29/36229/1 accepted/tizen/tv/20150304.043708 submit/tizen_tv/20150304.022459
authorKim Tae Soo <taesoo46.kim@samsung.com>
Wed, 4 Mar 2015 02:22:49 +0000 (11:22 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Wed, 4 Mar 2015 02:22:49 +0000 (11:22 +0900)
Change-Id: Ic3244c0613e286f7f774ce828cd2846730c335a1
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/base-view.cpp

index 8247cdb..b729090 100644 (file)
@@ -329,12 +329,15 @@ void CMusicBaseView::m_CreateCtxPopup(int btnType)
        }
        else if (btnType == BTN_SORT) {
                CSortCtxPopup *sortCtxPopup = NULL;
-               CSortCtxPopup::ESortBtnType sortBtnType;
+               CSortCtxPopup::ESortBtnType sortBtnType = CSortCtxPopup::TYPE_SONG;
                m->btntype = btnType;
                layout_id = m->lmgr->Layout()->LayoutId();
                sortCtxPopup = new CSortCtxPopup;
                if (layout_id) {
-                       if (!strcmp(layout_id, MUSIC_ALBUM_LAYOUT)) {
+                       if (!strcmp(layout_id, MUSIC_SONG_LAYOUT)) {
+                               sortBtnType = CSortCtxPopup::TYPE_SONG;
+                       }
+                       else if (!strcmp(layout_id, MUSIC_ALBUM_LAYOUT)) {
                                sortBtnType = CSortCtxPopup::TYPE_ALBUM;
                        }
                        else if (!strcmp(layout_id, MUSIC_FOLDER_LAYOUT)) {