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
This commit is contained in:
parent
afd8ef84c1
commit
bdae99298b
@ -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>("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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user