From 7beb9a7422ba9eeb8e9e0b6e9765e1c4ed8cb5dc Mon Sep 17 00:00:00 2001 From: Paavo Date: Tue, 10 Mar 2020 19:42:10 +0200 Subject: [PATCH 1/2] Do not consume F2 keypress when name editing is disabled --- MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs b/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs index 80aab5e..b623aa7 100644 --- a/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs +++ b/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs @@ -592,9 +592,9 @@ protected override void OnKeyDown(KeyEventArgs e) if (ParentTreeView.AllowEditItems && ContentTemplateEdit != null && IsFocused && IsEditable) { IsEditing = true; - } - e.Handled = true; - break; + e.Handled = true; + } + break; case Key.Escape: StopEditing(); e.Handled = true; From b57a9253e18c10dd47c2fd8d214af4da604931e2 Mon Sep 17 00:00:00 2001 From: Paavo Date: Tue, 10 Mar 2020 19:55:32 +0200 Subject: [PATCH 2/2] Adjusted whitespace in code --- MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs b/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs index b623aa7..7a024b2 100644 --- a/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs +++ b/MultiSelectTreeView/Controls/MultiSelectTreeViewItem.cs @@ -592,9 +592,9 @@ protected override void OnKeyDown(KeyEventArgs e) if (ParentTreeView.AllowEditItems && ContentTemplateEdit != null && IsFocused && IsEditable) { IsEditing = true; - e.Handled = true; - } - break; + e.Handled = true; + } + break; case Key.Escape: StopEditing(); e.Handled = true;