treeview: Do not set top row adjustment value while animating
authorMat <mail@mathias.is>
Wed, 10 Aug 2022 05:26:02 +0000 (08:26 +0300)
committerMat <mail@mathias.is>
Wed, 10 Aug 2022 05:32:47 +0000 (08:32 +0300)
gtk_tree_view_top_row_to_dy, which is called from GtkTreeView's
size_allocate function, changes the adjustment value. Since this
conflicts with the animation when changing the active row, bail
out until the animation is finished.

Fixes #4550

gtk/gtktreeview.c

index dc152898fdd8ca56cdc745f4ec4e2e3caa53fde3..bb45cb79a9c2da98a94d2768dd195043072f8eb7 100644 (file)
@@ -6493,6 +6493,9 @@ gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view)
   if (priv->in_top_row_to_dy)
     return;
 
+  if (gtk_adjustment_is_animating (priv->vadjustment))
+    return;
+
   if (priv->top_row)
     path = gtk_tree_row_reference_get_path (priv->top_row);
   else