src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Sat, 23 Mar 2024 07:54:01 +0000 (15:54 +0800)
committerAlan Knowles <alan@roojs.com>
Sat, 23 Mar 2024 07:54:01 +0000 (15:54 +0800)
src/Builder4/Editor.vala

src/Builder4/Editor.bjs
src/Builder4/Editor.vala

index 38be8d4..63e7d56 100644 (file)
                  ],
                  "$ xns" : "Gtk",
                  "* prop" : "model",
-                 "bool autoexpand" : true,
+                 "bool autoexpand" : false,
                  "bool passthrough" : false,
                  "items" : [
                   {
                  "listeners" : {
                   "items_changed" : [
                    "(position, removed, added) => {",
-                   "\tGLib.debug(\"tree item changed\");",
-                   "\tif (added  < 1) {",
-                   "\t\treturn;",
-                   "\t}",
+                   "\tGLib.debug(\"tree item changed %d %d %d\", position, removed, added);",
+                   "\t return;",
                    "\t//var sym = (Lsp.DocumentSymbol) this.el.get_item(position);",
                    "\tvar row = this.el.get_row(position);",
                    "\tvar sym = (Lsp.DocumentSymbol)  row.get_item();",
index bbdedc1..08a94ec 100644 (file)
@@ -2219,7 +2219,7 @@ public class Editor : Object
                {
                        _this = _owner;
                        new Xcls_navliststore( _this );
-                       this.el = new Gtk.TreeListModel( _this.navliststore.el, false, true, (item) => {
+                       this.el = new Gtk.TreeListModel( _this.navliststore.el, false, false, (item) => {
  
        return ((Lsp.DocumentSymbol)item).children;
 }
@@ -2231,10 +2231,8 @@ public class Editor : Object
 
                        //listeners
                        this.el.items_changed.connect( (position, removed, added) => {
-                               GLib.debug("tree item changed");
-                               if (added  < 1) {
-                                       return;
-                               }
+                               GLib.debug("tree item changed %d %d %d", position, removed, added);
+                                return;
                                //var sym = (Lsp.DocumentSymbol) this.el.get_item(position);
                                var row = this.el.get_row(position);
                                var sym = (Lsp.DocumentSymbol)  row.get_item();