Index: ui/transformations_ui.dragndrop.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/transformations/ui/transformations_ui.dragndrop.js,v
retrieving revision 1.3
diff -u -r1.3 transformations_ui.dragndrop.js
--- ui/transformations_ui.dragndrop.js	23 Jun 2009 20:07:28 -0000	1.3
+++ ui/transformations_ui.dragndrop.js	25 Jun 2009 14:33:59 -0000
@@ -88,9 +88,14 @@
     hoverClass: 'transformations-operation-slot-hover',
     tolerance: 'pointer',
     drop: function(event, ui) {
-      Drupal.transformationsUiConnectSlots(
-        $(this).parent().attr('id'), $(ui.draggable).attr('id')
-      );
+    var drag = $(ui.draggable).attr('id');
+    var drop = $(this).parent().attr('id');
+    
+      if(!Drupal.transformationsFromSameOperation(drag,drop)){
+        Drupal.transformationsUiConnectSlots(
+          drop, drag
+        );
+      }
     },
   });
   $('.transformations-operation-input .transformations-drop-target', context).droppable({
@@ -98,9 +103,14 @@
     hoverClass: 'transformations-operation-slot-hover',
     tolerance: 'pointer',
     drop: function(event, ui) {
-      Drupal.transformationsUiConnectSlots(
-        $(ui.draggable).attr('id'), $(this).parent().attr('id')
-      );
+      var drag = $(ui.draggable).attr('id');
+      var drop = $(this).parent().attr('id');
+      
+      if(!Drupal.transformationsFromSameOperation(drag,drop)){
+        Drupal.transformationsUiConnectSlots(
+          drag, drop
+        );
+      }
     },
   });
 
@@ -127,6 +137,22 @@
 }
 
 /**
+ * Checks an given parameters are from the same Operation or
+ * the one is from pipe parameters and the other from the pipe output
+ */
+Drupal.transformationsFromSameOperation = function(outputSlotId, inputSlotId){
+  var source = Drupal.settings.transformationsUiSlots[outputSlotId];
+  var target = Drupal.settings.transformationsUiSlots[inputSlotId];
+  
+  if((source.entity == target.entity) || (source.entity == '4' && target.entity=='2') 
+      || (source.entity == '2' && target.entity=='4')){
+    return true;
+  }else{
+    return false;
+  }
+}
+
+/**
  * Look for the bottom-most operation block and set the canvas's
  * minimum height appropriately.
  */
