listitemfactory: Don't rebind on position or selection changes
When the item doesn't change and only the position / selection state, then the signal list item factory should not emit bind + unbind signals. This used to work, but probably broke while refactoring for ColumnView during 4.10. This caused excessive rebinding when items got inserted at the top of a list instead of add the end.
This commit is contained in:
@@ -191,10 +191,12 @@ gtk_list_factory_widget_update (GtkListItemBase *base,
|
||||
|
||||
if (priv->object)
|
||||
{
|
||||
gpointer old_item = gtk_list_item_base_get_item (GTK_LIST_ITEM_BASE (self));
|
||||
|
||||
gtk_list_item_factory_update (priv->factory,
|
||||
priv->object,
|
||||
gtk_list_item_base_get_item (GTK_LIST_ITEM_BASE (self)) != NULL,
|
||||
item != NULL,
|
||||
item != old_item && old_item != NULL,
|
||||
item != old_item && item != NULL,
|
||||
gtk_list_factory_widget_update_func,
|
||||
&update);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user