tree-list-model: Return the correct item type

When passthrough is enabled, it should return the GType
of the child GListModels; when disabled, it should be
GTK_TYPE_TREE_LIST_ROW.

The conditions are inverted however, causing a few
warnings to trigger.

Fix that by returning the correct GType.
This commit is contained in:
Georges Basile Stavracas Neto 2018-09-18 00:51:57 -03:00
parent 05b2ae0f31
commit 1a4b60fb36

View File

@ -576,9 +576,9 @@ gtk_tree_list_model_get_item_type (GListModel *list)
GtkTreeListModel *self = GTK_TREE_LIST_MODEL (list); GtkTreeListModel *self = GTK_TREE_LIST_MODEL (list);
if (self->passthrough) if (self->passthrough)
return GTK_TYPE_TREE_LIST_ROW;
else
return g_list_model_get_item_type (self->root_node.model); return g_list_model_get_item_type (self->root_node.model);
else
return GTK_TYPE_TREE_LIST_ROW;
} }
static guint static guint