From 76f192785c856e32973f7a6a9e90a988f3da07ac Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 5 Aug 2021 17:19:59 +0800 Subject: [PATCH] fix: avoid to select hidden item in tree --- src/Views/Controls/Tree.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Views/Controls/Tree.cs b/src/Views/Controls/Tree.cs index ae2ed34f..95e6ecc5 100644 --- a/src/Views/Controls/Tree.cs +++ b/src/Views/Controls/Tree.cs @@ -164,6 +164,8 @@ namespace SourceGit.Views.Controls { } private void AddSelected(TreeItem item, bool removeOthers) { + if (!item.IsVisible) return; + if (removeOthers && Selected.Count > 0) { UnselectAllChildren(this); Selected.Clear();