Roo/grid/GridDragZone.js
[roojs1] / Roo / grid / GridDragZone.js
index 1a59661..25de399 100644 (file)
@@ -45,7 +45,11 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
         
         }
         
-        if(rowIndex !== false){
+        var sels = sm.getSelections ? sm.getSelections() : (
+                    sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : []);
+        
+        // before it used to all dragging of unseleted... - now we dont do that.
+        if(sels &&  sels.length){
             
             // if editorgrid.. 
             
@@ -65,14 +69,13 @@ Roo.extend(Roo.grid.GridDragZone, Roo.dd.DragZone, {
                 grid: this.grid,
                 ddel: this.ddel,
                 rowIndex: rowIndex,
-                selections:sm.getSelections ? sm.getSelections() : (
-                    sm.getSelectedCell() ? [ this.grid.ds.getAt(sm.getSelectedCell()[0]) ] : []
-                )
+                selections: sels
             };
         }
         return false;
     },
-
+    
+    
     onInitDrag : function(e){
         var data = this.dragData;
         this.ddel.innerHTML = this.grid.getDragDropText();