diff --git a/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs b/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs index 8fc9dcc63..51c9783f5 100644 --- a/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs +++ b/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs @@ -155,6 +155,24 @@ namespace mRemoteNGTests.Tree Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); } + [Test] + public void CantDragNodeAbovePuttySessionNodes() + { + var source = _connection1; + var target = new PuttySessionInfo(); + var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.AboveItem); + Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); + } + + [Test] + public void CantDragNodeBelowPuttySessionNodes() + { + var source = _connection1; + var target = new PuttySessionInfo(); + var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.BelowItem); + Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); + } + [Test] public void DraggingNodeBelowSiblingRearrangesTheUnderlyingModelCorrectly() { diff --git a/mRemoteV1/Tree/ConnectionTreeDragAndDropHandler.cs b/mRemoteV1/Tree/ConnectionTreeDragAndDropHandler.cs index ecce7ef12..f4ab1d008 100644 --- a/mRemoteV1/Tree/ConnectionTreeDragAndDropHandler.cs +++ b/mRemoteV1/Tree/ConnectionTreeDragAndDropHandler.cs @@ -112,6 +112,8 @@ namespace mRemoteNG.Tree var dragDropEffect = DragDropEffects.None; if (AncestorDraggingOntoChild(dropSource, dropTarget)) _infoMessage = Language.strNodeCannotDragParentOnChild; + else if (dropTarget is PuttySessionInfo || dropTarget is RootPuttySessionsNodeInfo) + _enableFeedback = false; else { dragDropEffect = DragDropEffects.Move;