fix: DataGrid does NOT scroll when navigation target is the same as current selected in Views.Histories. (#58)

This commit is contained in:
leo 2024-04-07 21:19:02 +08:00
parent d09e81b80a
commit 9a4f928ece
2 changed files with 31 additions and 0 deletions

View file

@ -61,6 +61,12 @@ namespace SourceGit.ViewModels
private set => SetProperty(ref _autoSelectedCommit, value);
}
public long NavigationId
{
get => _navigationId;
private set => SetProperty(ref _navigationId, value);
}
public object DetailContext
{
get => _detailContext;
@ -98,6 +104,7 @@ namespace SourceGit.ViewModels
if (commit != null)
{
AutoSelectedCommit = commit;
NavigationId = _navigationId + 1;
if (_detailContext is CommitDetail detail)
{
@ -597,6 +604,7 @@ namespace SourceGit.ViewModels
private List<Models.Commit> _commits = new List<Models.Commit>();
private Models.CommitGraph _graph = null;
private Models.Commit _autoSelectedCommit = null;
private long _navigationId = 0;
private object _detailContext = null;
}
}