mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feature: auto-select first change in commit details panel and revision/branch compare panel (#1019)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
1f35e83799
commit
c6747f72f9
11 changed files with 71 additions and 21 deletions
|
@ -25,8 +25,15 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public int ActivePageIndex
|
||||
{
|
||||
get => _activePageIndex;
|
||||
set => SetProperty(ref _activePageIndex, value);
|
||||
get => _repo.CommitDetailActivePageIndex;
|
||||
set
|
||||
{
|
||||
if (_repo.CommitDetailActivePageIndex != value)
|
||||
{
|
||||
_repo.CommitDetailActivePageIndex = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Models.Commit Commit
|
||||
|
@ -617,11 +624,7 @@ namespace SourceGit.ViewModels
|
|||
_changes = null;
|
||||
_revisionFiles.Clear();
|
||||
|
||||
FullMessage = string.Empty;
|
||||
SignInfo = null;
|
||||
Changes = [];
|
||||
VisibleChanges = null;
|
||||
SelectedChanges = null;
|
||||
ViewRevisionFileContent = null;
|
||||
Children.Clear();
|
||||
RevisionFileSearchFilter = string.Empty;
|
||||
|
@ -821,7 +824,6 @@ namespace SourceGit.ViewModels
|
|||
};
|
||||
|
||||
private Repository _repo = null;
|
||||
private int _activePageIndex = 0;
|
||||
private Models.Commit _commit = null;
|
||||
private string _fullMessage = string.Empty;
|
||||
private Models.CommitSignInfo _signInfo = null;
|
||||
|
|
|
@ -453,6 +453,12 @@ namespace SourceGit.ViewModels
|
|||
private set => SetProperty(ref _isAutoFetching, value);
|
||||
}
|
||||
|
||||
public int CommitDetailActivePageIndex
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = 0;
|
||||
|
||||
public Repository(bool isBare, string path, string gitDir)
|
||||
{
|
||||
IsBare = isBare;
|
||||
|
|
|
@ -1466,7 +1466,7 @@ namespace SourceGit.ViewModels
|
|||
return unstaged;
|
||||
|
||||
var visible = new List<Models.Change>();
|
||||
|
||||
|
||||
foreach (var c in unstaged)
|
||||
{
|
||||
if (c.Path.Contains(_unstagedFilter, StringComparison.OrdinalIgnoreCase))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue