fix<Tree>: avoid to select hidden item in tree

This commit is contained in:
leo 2021-08-05 17:19:59 +08:00
parent 07aa6661f4
commit 76f192785c

View file

@ -164,6 +164,8 @@ namespace SourceGit.Views.Controls {
} }
private void AddSelected(TreeItem item, bool removeOthers) { private void AddSelected(TreeItem item, bool removeOthers) {
if (!item.IsVisible) return;
if (removeOthers && Selected.Count > 0) { if (removeOthers && Selected.Count > 0) {
UnselectAllChildren(this); UnselectAllChildren(this);
Selected.Clear(); Selected.Clear();