Builder3/Window.js
[app.Builder.js] / Builder3 / Window.js
index bdf6448..0581fc1 100644 (file)
@@ -482,8 +482,8 @@ Window=new XObject({
                                                                                    return true;
                                                                                 }
                                                                                
-                                                                                if (ev.type != Gdk.EventType.BUTTON_PRESS  || ev.button.button != 3) {
-                                                                                    print("click" + ev.type);
+                                                                                if (ev.button.button != 3) {
+                                                                                    print("click" + ev.button.button);
                                                                                     return false;
                                                                                 }
                                                                               
@@ -1465,13 +1465,13 @@ Window=new XObject({
                                                                             listeners : {
                                                                                 activate : function (self) {
                                                                                 
-                                                                                     var tree = this.get('/LeftTree');
-                                                                                      var model = this.get('/LeftTree.model');
-                                                                                     var el = tree.getActivePath();
-                                                                                     print(el);
-                                                                                     var js = model.toJS(el, false);
+                                                                                    var tree = this.get('/LeftTree');
+                                                                                    var model = this.get('/LeftTree.model');
+                                                                                    var el = tree.getActivePath();
+                                                                                    print(el);
+                                                                                    var js = model.toJS(el, false);
                                                                                     // print(JSON.stringify(js[0], null,4));
-                                                                                     this.get('/DialogSaveTemplate').show(JSON.stringify(js[0], null,4));
+                                                                                    this.get('/DialogSaveTemplate').show(JSON.stringify(js[0], null,4));
                                                                                      
                                                                                     
                                                                                 }
@@ -2002,7 +2002,7 @@ Window=new XObject({
                                                                     }
                                                                     
                                                                      // right click.
-                                                                     if (ev.type == Gdk.EventType.BUTTON_PRESS  && ev.button.button == 3) {    
+                                                                     if (ev.button.button == 3) {    
                                                                         // show popup!.   
                                                                         if (res.column.title == 'value' && this.get('/LeftPanel').editing) {
                                                                             return false;
@@ -2200,7 +2200,11 @@ Window=new XObject({
                                                                         
                                                                         
                                                                         this.load(data);
-                                                                        this.get('/LeftTree.model').changed(data, true);
+                                                                        
+                                                                        
+                                                                        this.get('/LeftTree.model').setFromNode(false,this.toJS());
+                                                                        this.get('/LeftTree.model').changed(true); 
+                                                                        
                                                                         
                                                                     },
                                                                     getIterValue : function(iter, col) {
@@ -4031,7 +4035,7 @@ Window=new XObject({
                                                                         
                                                                         var pix = this.el.create_row_drag_icon ( path);
                                                                             
-                                                                                
+                                                                        print(pix);       
                                                                         if (Gtk.drag_set_icon_surface) {
                                                                                 Gtk.drag_set_icon_surface( ctx,   pix  );
                                                                         } else {