mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
filechooser: Tighten up some assertions when actually selecting files in the treeview
The model must be fully loaded, and it must be inserted in the treeview. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This commit is contained in:
parent
c56f508993
commit
a070d75a2f
@ -6329,9 +6329,14 @@ show_and_select_files (GtkFileChooserDefault *impl,
|
||||
gboolean selected_a_file;
|
||||
GSList *walk;
|
||||
|
||||
g_assert (impl->load_state == LOAD_FINISHED);
|
||||
g_assert (impl->browse_files_model != NULL);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
|
||||
fsmodel = GTK_FILE_SYSTEM_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (impl->browse_files_tree_view)));
|
||||
|
||||
g_assert (fsmodel == impl->browse_files_model);
|
||||
|
||||
enabled_hidden = impl->show_hidden;
|
||||
removed_filters = (impl->current_filter == NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user