32247bc50e63b709ae738a95a2ec71345b5fad75 made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model. The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.
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;
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