From 804b60b4a1dbf104cbb017edc66cc02b2d565c5d Mon Sep 17 00:00:00 2001 From: Philippe Miossec Date: Sun, 28 Feb 2021 11:19:19 +0100 Subject: [PATCH] File Tree: improve loading when changing from revision Remove most of the flickering when loading the tree view --- GitUI/CommandsDialogs/RevisionFileTreeControl.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GitUI/CommandsDialogs/RevisionFileTreeControl.cs b/GitUI/CommandsDialogs/RevisionFileTreeControl.cs index 1480c58cc29..d1a5ab96515 100644 --- a/GitUI/CommandsDialogs/RevisionFileTreeControl.cs +++ b/GitUI/CommandsDialogs/RevisionFileTreeControl.cs @@ -147,6 +147,7 @@ public void LoadRevision(GitRevision? revision) try { tvGitTree.SuspendLayout(); + tvGitTree.BeginUpdate(); // Save state only when there is selected node if (tvGitTree.SelectedNode is not null) @@ -209,6 +210,7 @@ public void LoadRevision(GitRevision? revision) } finally { + tvGitTree.EndUpdate(); tvGitTree.ResumeLayout(); } }