src/Builder4/WindowRooView.bjs
[app.Builder.js] / src / Builder4 / WindowRooView.vala
index e2b37aa..811ec5f 100644 (file)
@@ -933,7 +933,8 @@ public class Xcls_WindowRooView : Object
             // my vars (def)
         public bool loading;
         public bool allow_node_scroll;
-        public string propSelected;
+        public string prop_selected;
+        public JsRender.Node? node_selected;
 
         // ctor
         public Xcls_sourceview(Xcls_WindowRooView _owner )
@@ -945,7 +946,8 @@ public class Xcls_WindowRooView : Object
             // my vars (dec)
             this.loading = true;
             this.allow_node_scroll = true;
-            this.propSelected = "";
+            this.prop_selected = "";
+            this.node_selected = null;
 
             // set gobject values
             this.el.editable = false;
@@ -1059,7 +1061,7 @@ public class Xcls_WindowRooView : Object
                 
                 
                 
-                
+                // ---------- this selects the tree's node...
                 
                 var ltree = _this.main_window.windowstate.left_tree;
                 var tp = ltree.model.treePathFromNode(node);
@@ -1074,7 +1076,7 @@ public class Xcls_WindowRooView : Object
                     
                     // let's try allowing editing on the methods.
                     // a little klunky at present..
-                    this.propSelected = "";
+                    this.prop_selected = "";
                     if (prop != null) {
                                //see if we can find it..
                                var kv = prop.split(":");
@@ -1082,7 +1084,7 @@ public class Xcls_WindowRooView : Object
                                
                                        //var k = prop.get_key(kv[1]);
                                        // fixme -- need to determine if it's an editable property...
-                                       this.propSelected = prop;
+                                       this.prop_selected = prop;
                                        
                                } else if (kv[0] == "l") {
                                         this.propSelected = prop;
@@ -1105,18 +1107,21 @@ public class Xcls_WindowRooView : Object
         public void nodeSelected (JsRender.Node? sel, bool scroll ) {
           
             
-          
+               
             // this is connected in widnowstate
-            print("node selected\n");
-            var buf = this.el.get_buffer();
-         
-            var sbuf = (Gtk.SourceBuffer) buf;
         
-           
+        
+               // not sure why....   
             while(Gtk.events_pending()) {
                 Gtk.main_iteration();
             }
             
+            this.nodeSelected = sel;
+        
+            print("node selected\n");
+            var buf = this.el.get_buffer();
+            var sbuf = (Gtk.SourceBuffer) buf;
+        
            
             // clear all the marks..
             Gtk.TextIter start;