mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -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>
|
<DataGrid.RowStyle>
|
||||||
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
||||||
<EventSetter Event="ContextMenuOpening" Handler="ChangeListContextMenuOpening"/>
|
<EventSetter Event="ContextMenuOpening" Handler="ChangeListContextMenuOpening"/>
|
||||||
|
<EventSetter Event="MouseDoubleClick" Handler="ChangeListMouseDoubleClick"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
|
@ -280,6 +280,18 @@ namespace SourceGit.UI {
|
||||||
menu.IsOpen = true;
|
menu.IsOpen = true;
|
||||||
e.Handled = 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
|
#endregion
|
||||||
|
|
||||||
#region FILES
|
#region FILES
|
||||||
|
@ -466,5 +478,6 @@ namespace SourceGit.UI {
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue