mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
Fixed process executing on clicking enter if no text in search box
This commit is contained in:
parent
65cda38cc8
commit
d0822ab1fe
@ -152,6 +152,8 @@ namespace Wox.ViewModel
|
|||||||
results.SelectedIndex = int.Parse(index.ToString());
|
results.SelectedIndex = int.Parse(index.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(results.SelectedItem != null)
|
||||||
|
{
|
||||||
//If there is a context button selected fire the action for that button before the main command.
|
//If there is a context button selected fire the action for that button before the main command.
|
||||||
bool didExecuteContextButton = results.SelectedItem?.ExecuteSelectedContextButton() ?? false;
|
bool didExecuteContextButton = results.SelectedItem?.ExecuteSelectedContextButton() ?? false;
|
||||||
|
|
||||||
@ -181,6 +183,7 @@ namespace Wox.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
LoadContextMenuCommand = new RelayCommand(_ =>
|
LoadContextMenuCommand = new RelayCommand(_ =>
|
||||||
@ -419,6 +422,7 @@ namespace Wox.ViewModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Results.SelectedItem = null;
|
||||||
Results.Clear();
|
Results.Clear();
|
||||||
Results.Visbility = Visibility.Collapsed;
|
Results.Visbility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,10 @@ namespace Wox.ViewModel
|
|||||||
_selectedItem = value;
|
_selectedItem = value;
|
||||||
_selectedItem.ActivateContextButtons(ResultViewModel.ActivationType.Selection);
|
_selectedItem.ActivateContextButtons(ResultViewModel.ActivationType.Selection);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_selectedItem = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user