[gnome-builder/wip/gtk4-port] plugins/find-other-file: force empty model



commit d72c80bb6a8e4c595d44672ad7a553f1805f84bf
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 1 13:00:21 2022 -0700

    plugins/find-other-file: force empty model
    
    There seems to be an issue I'm coming across where the listview manager
    gets in a weird state. Try to work around it by forcing an empty list
    rather than a NULL list.

 src/plugins/find-other-file/gbp-find-other-file-popover.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/find-other-file/gbp-find-other-file-popover.c 
b/src/plugins/find-other-file/gbp-find-other-file-popover.c
index 64c203707..33b4e57c4 100644
--- a/src/plugins/find-other-file/gbp-find-other-file-popover.c
+++ b/src/plugins/find-other-file/gbp-find-other-file-popover.c
@@ -106,6 +106,10 @@ gbp_find_other_file_popover_set_model (GbpFindOtherFilePopover *self,
                                         g_object_unref);
           selection = gtk_no_selection_new (G_LIST_MODEL (map));
         }
+      else
+        {
+          selection = gtk_no_selection_new (G_LIST_MODEL (g_list_store_new (GBP_TYPE_FOUND_FILE)));
+        }
 
       gtk_list_view_set_model (self->list_view, GTK_SELECTION_MODEL (selection));
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MODEL]);


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