src/JsRender/NodeToGtk.vala
authorAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:29:17 +0000 (11:29 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:29:17 +0000 (11:29 +0800)
src/JsRender/NodeToGtk.vala

index 4b3a96b..416a05b 100644 (file)
@@ -281,16 +281,11 @@ public class JsRender.NodeToGtk : Object {
                        labels.add(this.children.get(i));
                }
                for (var i = 0; i < bodies.size; i++) {
-                       if (i => labels.size) {
-                               // more bodies than labels..
-                               continue;
-                       }
+                       var lbl = labels.get(i);
+
                        ((global::Gtk.Notebook)this.wrapped_object).append_page(
                                 (global::Gtk.Notebook) bodies.get(i).wrapped_object,
-                                (labels.size > i - 1) ? 
-                                       (global::Gtk.Notebook) labels.get(i).wrapped_object :
-                                       null
-                                       
+                                lbl != null ?  (global::Gtk.Notebook) lbl.wrapped_object : null
                        );