[gnome-games/wip/exalm/spinner-performance: 14/19] sidebar-view: Fix model binding



commit 0a70a2eb4a7557dcf38088a1cb8a17d9016b97eb
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sat Sep 22 15:43:42 2018 +0500

    sidebar-view: Fix model binding

 src/ui/sidebar-view.vala | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/ui/sidebar-view.vala b/src/ui/sidebar-view.vala
index 65f585ed..cca66717 100644
--- a/src/ui/sidebar-view.vala
+++ b/src/ui/sidebar-view.vala
@@ -32,6 +32,12 @@ private abstract class Games.SidebarView : Gtk.Bin {
 
                        _model = value;
 
+                       uint n_items = model.get_n_items ();
+                       for (uint i = 0; i < n_items; i++) {
+                               var game = model.get_item (i) as Game;
+                               game_added (game);
+                       }
+
                        if (model != null)
                                model_items_changed_id = model.items_changed.connect (on_model_changed);
                }


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