[gnome-photos/wip/uajain/master-fixes] item-manager: Remove assertion while hiding



commit 9069aae13f13df5a58366f47af11d5064587e56c
Author: Umang Jain <mailumangjain gmail com>
Date:   Sat Sep 3 05:10:34 2016 +0530

    item-manager: Remove assertion while hiding
    
    This assertion will definitely break because on "window-mode-changed" signal,
    tracker-controller will clear the item-manager's mode-specific child and
    repopulate it with it's cursor by calling item_manager_add_item_for_mode.
    
    Point to note is that, while clearing, the item is still present in other
    item_mngr_chldrn. Therefore, the same id will give two different pointers
    in the assertion and it will break.

 src/photos-item-manager.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 09e089d..099549f 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -984,10 +984,7 @@ photos_item_manager_hide_item (PhotosItemManager *self, PhotosBaseItem *item)
 
       item1 = PHOTOS_BASE_ITEM (photos_base_manager_get_object_by_id (self->item_mngr_chldrn[i], id));
       if (item1 != NULL)
-        {
-          g_assert_true (item == item1);
-          hidden_item->modes[i] = TRUE;
-        }
+        hidden_item->modes[i] = TRUE;
     }
 
   g_hash_table_insert (self->hidden_items, g_strdup (id), hidden_item);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]