feature<CommitDetail>: goto diff view by double click changed file in commit information panel

This commit is contained in:
leo 2021-05-13 10:55:25 +08:00
parent 0810e19f93
commit b9b0899d48
6 changed files with 66 additions and 6 deletions

View file

@ -4,6 +4,7 @@ using System.IO;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
namespace SourceGit.Views.Widgets {
@ -88,11 +89,23 @@ namespace SourceGit.Views.Widgets {
}
#endregion
#region INFORMATION
#region EVENTS
private void OnNavigateParent(object sender, RequestNavigateEventArgs e) {
Models.Watcher.Get(repo)?.NavigateTo(e.Uri.OriginalString);
}
private void OnChangeListMouseDoubleClick(object sender, MouseButtonEventArgs e) {
var row = sender as DataGridRow;
if (row == null) return;
var change = row.DataContext as Models.Change;
if (change == null) return;
body.SelectedIndex = 1;
changeContainer.Select(change);
e.Handled = true;
}
private void OnChangeListContextMenuOpening(object sender, ContextMenuEventArgs e) {
var row = sender as DataGridRow;
if (row == null) return;