mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
fix: new created branch expanded state is not remembered
This commit is contained in:
parent
68210d8a3e
commit
65e820e4d5
1 changed files with 7 additions and 2 deletions
|
@ -126,12 +126,17 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
CallUIThread(() =>
|
CallUIThread(() =>
|
||||||
{
|
{
|
||||||
if (succ && CheckoutAfterCreated && _repo.HistoriesFilterMode == Models.FilterMode.Included)
|
if (succ && CheckoutAfterCreated)
|
||||||
{
|
{
|
||||||
var fake = new Models.Branch() { IsLocal = true, FullName = $"refs/heads/{_name}" };
|
var fake = new Models.Branch() { IsLocal = true, FullName = $"refs/heads/{_name}" };
|
||||||
if (BasedOn is Models.Branch based && !based.IsLocal)
|
if (BasedOn is Models.Branch based && !based.IsLocal)
|
||||||
fake.Upstream = based.FullName;
|
fake.Upstream = based.FullName;
|
||||||
|
|
||||||
|
var folderEndIdx = fake.FullName.LastIndexOf('/');
|
||||||
|
if (folderEndIdx > 10)
|
||||||
|
_repo.Settings.ExpandedBranchNodesInSideBar.Add(fake.FullName.Substring(0, folderEndIdx));
|
||||||
|
|
||||||
|
if (_repo.HistoriesFilterMode == Models.FilterMode.Included)
|
||||||
_repo.SetBranchFilterMode(fake, Models.FilterMode.Included, true, false);
|
_repo.SetBranchFilterMode(fake, Models.FilterMode.Included, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue