diff options
author | Benjamin Otte <otte@redhat.com> | 2023-04-10 23:17:41 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-05-09 17:00:40 +0200 |
commit | 03ac6611c1ec623aba3cab8cd1e50914d2099351 (patch) | |
tree | 262e8cfedbb06888ec1addfec09aab3d7dfa81d3 /gtk/gtklistitembase.c | |
parent | 0ff88346cd991f14c3158411dc7b4d1d48b26262 (diff) | |
download | gtk+-03ac6611c1ec623aba3cab8cd1e50914d2099351.tar.gz |
listitembase: exit early
When update() is called but no values are changed, exit early.
Diffstat (limited to 'gtk/gtklistitembase.c')
-rw-r--r-- | gtk/gtklistitembase.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtklistitembase.c b/gtk/gtklistitembase.c index 67bbf95912..cdd8fe9703 100644 --- a/gtk/gtklistitembase.c +++ b/gtk/gtklistitembase.c @@ -81,6 +81,11 @@ gtk_list_item_base_update (GtkListItemBase *self, GtkListItemBasePrivate *priv = gtk_list_item_base_get_instance_private (self); gboolean was_selected; + if (priv->position == position && + priv->item == item && + priv->selected == selected) + return; + was_selected = priv->selected; GTK_LIST_ITEM_BASE_GET_CLASS (self)->update (self, position, item, selected); |