mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
fix: crash when click blank area of change list in Information page of CommitDetail (#192)
This commit is contained in:
parent
02ace694d0
commit
c1c27be39a
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,12 @@ namespace SourceGit.Views
|
||||||
if (DataContext is ViewModels.CommitDetail detail)
|
if (DataContext is ViewModels.CommitDetail detail)
|
||||||
{
|
{
|
||||||
var datagrid = sender as DataGrid;
|
var datagrid = sender as DataGrid;
|
||||||
|
if (datagrid.SelectedItem == null)
|
||||||
|
{
|
||||||
|
e.Handled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
detail.ActivePageIndex = 1;
|
detail.ActivePageIndex = 1;
|
||||||
detail.SelectedChanges = new() { datagrid.SelectedItem as Models.Change };
|
detail.SelectedChanges = new() { datagrid.SelectedItem as Models.Change };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue