mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
Merge branch 'wip/corey/filesystemmodel' into 'main'
filesystemmodel: Notify correct position removed in remove_file() See merge request GNOME/gtk!5814
This commit is contained in:
commit
ba43a126b9
@ -331,8 +331,6 @@ list_model_get_item (GListModel *list_model,
|
||||
GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (list_model);
|
||||
FileModelNode *node;
|
||||
|
||||
/* The first items of GtkFileSystemModel is not really a file,
|
||||
* so ignore it. */
|
||||
if (position >= model->files->len)
|
||||
return NULL;
|
||||
|
||||
@ -502,7 +500,7 @@ remove_file (GtkFileSystemModel *model,
|
||||
|
||||
g_array_remove_index (model->files, id);
|
||||
|
||||
g_list_model_items_changed (G_LIST_MODEL (model), id - 1, 1, 0);
|
||||
g_list_model_items_changed (G_LIST_MODEL (model), id, 1, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user