From 1d604b5425cbbaf54f2b5be181096d1cf6b0271d Mon Sep 17 00:00:00 2001 From: Leaf Shi <132890443+LeafShi1@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:25:25 -0800 Subject: [PATCH] =?UTF-8?q?When=20the=20cursor=20is=20not=20over=20any=20c?= =?UTF-8?q?ontrol=20and=20not=20in=20a=20row/column,=20chan=E2=80=A6=20(#1?= =?UTF-8?q?0230)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the cursor is not over any control and not in a row/column, change insertIndex to the last one. --- .../src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs index 2791cd63fbd..8c84efa9e70 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FlowLayoutPanelDesigner .cs @@ -898,6 +898,7 @@ protected override void OnDragOver(DragEventArgs de) { // Here, we're at the 'end' of the FlowLayoutPanel - not over // any controls and not in a row/column. + _insertionIndex = FlowLayoutPanel.Controls.Count; EraseIBar(); } }