Skip to content

Commit

Permalink
Prevent treeview scrolling during ReloadAsync
Browse files Browse the repository at this point in the history
fix for issue gitextensions#5907
  • Loading branch information
freza-tm committed Dec 15, 2018
1 parent ca8cda5 commit 9338cb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GitUI/BranchTreePanel/RepoObjectsTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ public async Task ReloadAsync()
if (selectedNode != null)
{
treeMain.SelectedNode = selectedNode;
treeMain.Scrollable = false; // disable scrolling, so the next call does not horizontally scroll
treeMain.SelectedNode.EnsureVisible();
treeMain.Scrollable = true;
}

_rootNodes.ForEach(t => t.IgnoreSelectionChangedEvent = false);
Expand Down

0 comments on commit 9338cb1

Please sign in to comment.