Skip to content

Commit

Permalink
File Tree: improve loading when changing from revision
Browse files Browse the repository at this point in the history
Remove most of the flickering when loading the tree view
  • Loading branch information
pmiossec committed Feb 28, 2021
1 parent 33a7b27 commit 804b60b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GitUI/CommandsDialogs/RevisionFileTreeControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -209,6 +210,7 @@ public void LoadRevision(GitRevision? revision)
}
finally
{
tvGitTree.EndUpdate();
tvGitTree.ResumeLayout();
}
}
Expand Down

0 comments on commit 804b60b

Please sign in to comment.