reset name look up on non-symbol key presses.

This commit is contained in:
morkt 2016-09-09 13:18:18 +04:00
parent 36b912da07
commit 58d66c4210

View File

@ -590,10 +590,25 @@ namespace GARbro.GUI
private void lv_KeyDown (object sender, KeyEventArgs e)
{
if (e.IsDown && Key.Space == e.Key && LookupActive)
if (e.IsDown && LookupActive)
{
switch (e.Key)
{
case Key.Space:
LookupItem (" ", e.Timestamp);
e.Handled = true;
break;
case Key.Down:
case Key.Up:
case Key.Left:
case Key.Right:
case Key.Next:
case Key.Prior:
case Key.Home:
case Key.End:
m_current_input.Reset();
break;
}
}
}
@ -629,6 +644,11 @@ namespace GARbro.GUI
{
if (string.IsNullOrEmpty (key))
return;
if ("\x1B" == key) // escape key
{
m_current_input.Reset();
return;
}
var source = CurrentDirectory.ItemsSource as CollectionView;
if (source == null)
return;