Fix #7987 - drag move supported with shift key now
[roobuilder] / src / JsRender / Node.vala
index 324f048..a06076a 100644 (file)
@@ -111,6 +111,9 @@ public class JsRender.Node : GLib.Object {
        public Gee.ArrayList<int> node_lines; 
        public Gee.HashMap<int,Node> node_lines_map; // store of l:xxx or p:....
        
+       
+       public string node_pad = "";
+       
        private int _updated_count = 0;
        public int updated_count { 
                get {
@@ -119,7 +122,10 @@ public class JsRender.Node : GLib.Object {
                set  {
                        this.nodeTitleProp = ""; // ?? should trigger set?
                        this.iconFilename = "";
-                       this. _updated_count = value;
+                       this._updated_count = value;
+                       if (this.parent != null) {
+                               this.parent.updated_count++;
+                       }
                }
  
        } // changes to this trigger updates on the tree..
@@ -145,6 +151,20 @@ public class JsRender.Node : GLib.Object {
                
        }
        
+       public bool has_parent(Node n) 
+       {
+               if (this.parent == null) {
+                       return false;
+               }
+               if (this.parent.oid == n.oid) {
+                       return true;
+               }
+               
+
+               return this.parent.has_parent(n);
+       }
+       
+       
        public  Gee.ArrayList<Node> readItems()
        {
                return this.items; // note should not modify add/remove from this directly..
@@ -206,6 +226,7 @@ public class JsRender.Node : GLib.Object {
                
                
                
+               
                //GLib.debug("setLine %d, %s", line, type + ":" + prop);
        }
        public void sortLines() {