[gtk/matthiasc/for-master: 4/5] constraintlayout: Emit less change notification
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 4/5] constraintlayout: Emit less change notification
- Date: Fri, 30 Oct 2020 19:05:07 +0000 (UTC)
commit 4b8134b19b7430b37093d2361d94313137ba0388
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 30 14:57:58 2020 -0400
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.
gtk/gtkconstraintlayout.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c
index 20027b480c..86ae56ce06 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]