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



commit b6781e06c160142ce9ff089962d3a038f1a548ab
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 86cdd2840f..fd8e258dda 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -1091,6 +1091,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));
 }
 
 /**
@@ -1111,4 +1113,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]