Fix Bug: 12/37712/1
authorKim Tae Soo <taesoo46.kim@samsung.com>
Thu, 2 Apr 2015 23:15:08 +0000 (08:15 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Thu, 2 Apr 2015 23:16:25 +0000 (08:16 +0900)
In case of removing songs from a playlist, song list are not shown properly.
It is because previous information was not deleted so previous list data was appended.
Modified to delete previous information.

Change-Id: If77de773b6fb71c56cfa7906394b29ca0739f68e
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/playlist-layout.cpp

index 44cc0a5..c93d030 100644 (file)
@@ -97,12 +97,10 @@ void CPlaylistLayout::m_PlaylistCtxtAction(EActionType type)
                return;
        }
 
-       if (!t.c_catinfo)
-               t.c_catinfo = new CCategoryInfo;
-
-       if (!t.c_catinfo->FlagCreate())
-               t.c_catinfo->Create();
+       if (t.c_catinfo && t.c_catinfo->FlagCreate())
+               t.c_catinfo->Destroy();
 
+       t.c_catinfo->Create();
        t.c_catinfo->Duplicate(catinfo);
 
        switch (type) {