From 97e5936f0974175faa570bac486645a6a8770412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Mon, 11 Mar 2024 11:09:34 +0100 Subject: [PATCH] Update DockControlState.cs --- src/Dock.Avalonia/Internal/DockControlState.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Dock.Avalonia/Internal/DockControlState.cs b/src/Dock.Avalonia/Internal/DockControlState.cs index 809ae3d45..91fcf9392 100644 --- a/src/Dock.Avalonia/Internal/DockControlState.cs +++ b/src/Dock.Avalonia/Internal/DockControlState.cs @@ -140,9 +140,14 @@ private void Execute(Point point, DockOperation operation, DragAction dragAction if (_state.DragControl.DataContext is IDockable sourceDockable && _state.DropControl.DataContext is IDockable targetDockable) { if (sourceDockable is IDock dock) + { sourceDockable = dock.ActiveDockable; + } + if (sourceDockable == null) + { return; + } DockManager.Position = DockHelpers.ToDockPoint(point);