mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
为历史记录的 INFORMATION Tab页中的 CHANGE 增加双击打开文件历史
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user