From 2f5f98770f47f59bc96493454836ef2039073431 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 16 Jul 2024 15:02:47 +0800 Subject: [PATCH] enhance: expand tree for current branch (#262) --- src/ViewModels/BranchTreeNode.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ViewModels/BranchTreeNode.cs b/src/ViewModels/BranchTreeNode.cs index e1ec134f..02f5aeff 100644 --- a/src/ViewModels/BranchTreeNode.cs +++ b/src/ViewModels/BranchTreeNode.cs @@ -152,6 +152,8 @@ namespace SourceGit.ViewModels if (folders.TryGetValue(folder, out var val)) { lastFolder = val; + if (!lastFolder.IsExpanded) + lastFolder.IsExpanded |= (branch.IsCurrent || _expanded.Contains(folder)); } else if (lastFolder == null) {