Removed dead code

This commit is contained in:
Tig
2024-06-08 21:31:59 -06:00
parent 0610c0f20f
commit 946a123fc6

View File

@@ -720,30 +720,6 @@ public partial class View
return false;
}
// Function to search the subview hierarchy for the first view that has a KeyBindingScope.Application binding for the key.
// Called from Application.OnKeyDown
// TODO: Unwind recursion
// QUESTION: Should this return a list of views? As is, it will only return the first view that has the binding.
internal static View FindViewWithApplicationKeyBinding (View start, Key keyEvent)
{
if (start.KeyBindings.TryGet (keyEvent, KeyBindingScope.Application, out KeyBinding binding))
{
return start;
}
foreach (View subview in start.Subviews)
{
View found = FindViewWithApplicationKeyBinding (subview, keyEvent);
if (found is { })
{
return found;
}
}
return null;
}
/// <summary>
/// Invoked when a key is pressed that may be mapped to a key binding. Set <see cref="Key.Handled"/> to true to
/// stop the key from being processed by other views.