зеркало из https://github.com/github/VisualStudio.git
Responding to tne enter key in the PullRequest TreeView
This commit is contained in:
Родитель
05362a2b40
Коммит
981ad00a52
|
@ -294,6 +294,7 @@
|
|||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Margin="0 6 0 0"
|
||||
KeyUp="FileListKeyUp"
|
||||
MouseRightButtonDown="FileListMouseRightButtonDown"
|
||||
MouseDoubleClick="FileListMouseDoubleClick">
|
||||
<TreeView.ItemContainerStyle>
|
||||
|
|
|
@ -202,6 +202,18 @@ namespace GitHub.VisualStudio.Views.GitHubPane
|
|||
ns?.ShowMessage(message + ": " + e.Message);
|
||||
}
|
||||
|
||||
private void FileListKeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Return)
|
||||
{
|
||||
var file = (e.OriginalSource as FrameworkElement)?.DataContext as IPullRequestFileNode;
|
||||
if (file != null)
|
||||
{
|
||||
DoDiffFile(file, false).Forget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FileListMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var file = (e.OriginalSource as FrameworkElement)?.DataContext as IPullRequestFileNode;
|
||||
|
|
Загрузка…
Ссылка в новой задаче