mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
fix: branch tree not restore last IsExpanded nodes. See issue #20
* Binding IsExpanded property of TreeViewItem with Models.BranchTreeNode * Current local branch should never be collapsed
This commit is contained in:
parent
ef26f5b41c
commit
213f04a57b
2 changed files with 13 additions and 2 deletions
|
@ -114,7 +114,7 @@ namespace SourceGit.Models {
|
|||
lastFolder = new BranchTreeNode() {
|
||||
Name = subs[i],
|
||||
Type = BranchTreeNodeType.Folder,
|
||||
IsExpanded = _expanded.Contains(path),
|
||||
IsExpanded = branch.IsCurrent || _expanded.Contains(path),
|
||||
};
|
||||
roots.Add(lastFolder);
|
||||
_maps.Add(path, lastFolder);
|
||||
|
@ -122,7 +122,7 @@ namespace SourceGit.Models {
|
|||
var folder = new BranchTreeNode() {
|
||||
Name = subs[i],
|
||||
Type = BranchTreeNodeType.Folder,
|
||||
IsExpanded = _expanded.Contains(path),
|
||||
IsExpanded = branch.IsCurrent || _expanded.Contains(path),
|
||||
};
|
||||
_maps.Add(path, folder);
|
||||
lastFolder.Children.Add(folder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue