constraintlayout: Emit less change notification

This isn't strictly required for correctness, but
it makes the GtkBuilder codepath do the same that
the vfl codepath does: call gtk_layout_manager_layout_changed
only once, after all the constraints have been added.
This commit is contained in:
Matthias Clasen 2020-10-30 14:57:58 -04:00
parent 588fe5b5c1
commit 4b8134b19b

View File

@ -1696,9 +1696,14 @@ gtk_constraint_layout_custom_finished (GtkBuildable *buildable,
continue;
}
gtk_constraint_layout_add_constraint (data->layout, c);
layout_add_constraint (data->layout, c);
g_hash_table_add (data->layout->constraints, c);
if (data->layout->constraints_observer)
g_list_store_append (data->layout->constraints_observer, c);
}
gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (data->layout));
g_list_free_full (data->constraints, constraint_data_free);
g_list_free_full (data->guides, guide_data_free);
g_object_unref (data->layout);