[gtk/wip/ebassi/constraint-layout: 105/105] Notify a layout change when adding and removing constraints



commit 7afac642259dc8bf05a53c1674596107ed9d0f83
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jun 27 17:37:09 2019 +0100

    Notify a layout change when adding and removing constraints
    
    Changing the set of constraints should cause a relayout.

 gtk/gtkconstraintlayout.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c
index 54056bf73c..bbdd27746c 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -1096,6 +1096,8 @@ gtk_constraint_layout_add_constraint (GtkConstraintLayout *manager,
   layout_add_constraint (manager, constraint);
 
   g_hash_table_add (manager->constraints, constraint);
+
+  gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (manager));
 }
 
 /**
@@ -1116,4 +1118,6 @@ gtk_constraint_layout_remove_constraint (GtkConstraintLayout *manager,
 
   gtk_constraint_detach (constraint);
   g_hash_table_remove (manager->constraints, constraint);
+
+  gtk_layout_manager_layout_changed (GTK_LAYOUT_MANAGER (manager));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]