From bdae99298b93174e6957d5e909f2b48a76470a82 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 25 Jan 2020 03:28:31 -0500 Subject: [PATCH] on winforms, event must be cancelled to prevent default text box handler from spitting out an annoying 'ding' sound, also we have to manually close the window too --- .../Dialogs/GenericBrowserPopup.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs index a9d8b2e8..14e81c6d 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Dialogs/GenericBrowserPopup.cs @@ -131,6 +131,7 @@ namespace UniversalEditor.UserInterface.Dialogs { if (e.Key == KeyboardKey.Enter) { + e.Cancel = true; if (lv.SelectedRows.Count != 1) return; SelectedObject = lv.SelectedRows[0].GetExtraData("TRef")?.Create(); @@ -140,8 +141,10 @@ namespace UniversalEditor.UserInterface.Dialogs } else if (e.Key == KeyboardKey.Escape) { + e.Cancel = true; + // already handled by GTK? but what about other platforms - // Close(); + Close(); } }