mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
为历史记录的 INFORMATION Tab页中的 CHANGE 增加双击打开文件历史
This commit is contained in:
parent
689b02cd61
commit
f8bb65ce47
2 changed files with 14 additions and 0 deletions
|
@ -211,6 +211,7 @@
|
|||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
||||
<EventSetter Event="ContextMenuOpening" Handler="ChangeListContextMenuOpening"/>
|
||||
<EventSetter Event="MouseDoubleClick" Handler="ChangeListMouseDoubleClick"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</DataGrid>
|
||||
|
|
|
@ -280,6 +280,18 @@ namespace SourceGit.UI {
|
|||
menu.IsOpen = true;
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void ChangeListMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var row = sender as DataGridRow;
|
||||
if (row == null) return;
|
||||
|
||||
var change = row.DataContext as Git.Change;
|
||||
if (change == null) return;
|
||||
|
||||
var viewer = new FileHistories(repo, change.Path);
|
||||
viewer.Show();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region FILES
|
||||
|
@ -466,5 +478,6 @@ namespace SourceGit.UI {
|
|||
e.Handled = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue