mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
fix: crash when click blank area of change list in Information page of CommitDetail (#192)
This commit is contained in:
@@ -15,6 +15,12 @@ namespace SourceGit.Views
|
||||
if (DataContext is ViewModels.CommitDetail detail)
|
||||
{
|
||||
var datagrid = sender as DataGrid;
|
||||
if (datagrid.SelectedItem == null)
|
||||
{
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
detail.ActivePageIndex = 1;
|
||||
detail.SelectedChanges = new() { datagrid.SelectedItem as Models.Change };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user