reset the category title when path is null 28/35528/1
authorMinkyu Kang <mk7.kang@samsung.com>
Tue, 17 Feb 2015 06:59:06 +0000 (15:59 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 17 Feb 2015 07:03:53 +0000 (16:03 +0900)
Change-Id: I612669cc8e754ef3a225dce611854d4ed346c94d
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
src/view/gallery-view/layout_all.cpp

index 3a27797..c1bb173 100644 (file)
@@ -458,8 +458,6 @@ void CAllLayout::Update(struct layout_data *ld)
 {
        ASSERT(m);
 
-       char *buf;
-
        m->arglist = ld->arglist;
        m->sort = ld->sort;
        m->media_list = eina_list_clone(ld->media_list);
@@ -485,10 +483,13 @@ void CAllLayout::Update(struct layout_data *ld)
                return;
 
        if (ld->path) {
-               buf = ld->path;
                elm_object_part_text_set(Layout(),
-                       PART_CATEGORY_TITLE, buf);
-               free(buf);
+                       PART_CATEGORY_TITLE, ld->path);
+               free(ld->path);
+               ld->path = NULL;
+       } else {
+               elm_object_part_text_set(Layout(),
+                       PART_CATEGORY_TITLE, "");
        }
 
        m->current_item = elm_gengrid_first_item_get(m->grid);