[gnome-photos] Revert "view-container: Assert that selection is restricted ..."



commit ecf86fce34a5be086808e7211a4400f8998226a1
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Aug 29 18:09:25 2016 +0200

    Revert "view-container: Assert that selection is restricted ..."
    
    Avoid triggering this assertion while searching:
      CRITICAL **: photos_view_container_view_selection_changed: assertion
        'self->mode == mode' failed
    
    GdMainView emits view-selection-changed even when the underlying
    GtkTreeModel is cleared without anything being selected. This happens
    when we search. The ViewModel for the SEARCH mode is cleared when
    TrackerSearchController issues the search query. Unfortunately, due to
    the ordering of the SearchController::search-string-changed handlers,
    this happens before the application has switched to the SEARCH mode and
    the assertion is triggered.
    
    This reverts commit a243a9110ce6edb1a786d502ced2ec21594acc2b.

 src/photos-view-container.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-view-container.c b/src/photos-view-container.c
index c11f0ea..353ff3b 100644
--- a/src/photos-view-container.c
+++ b/src/photos-view-container.c
@@ -215,10 +215,6 @@ photos_view_container_view_selection_changed (PhotosViewContainer *self)
 {
   GList *selected_urns;
   GList *selection;
-  PhotosWindowMode mode;
-
-  mode = photos_mode_controller_get_window_mode (self->mode_cntrlr);
-  g_return_if_fail (self->mode == mode);
 
   selection = gd_main_view_get_selection (self->view);
   selected_urns = photos_utils_get_urns_from_paths (selection, GTK_TREE_MODEL (self->model));


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