mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-26 12:55:00 +00:00
fix: OnNodesSelectionChanged
event should not be disabled while auto-selecting current branch (#1022)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
4c4d8ae031
commit
00ccf29b2b
1 changed files with 0 additions and 6 deletions
|
@ -246,16 +246,11 @@ namespace SourceGit.Views
|
|||
if (branch == null)
|
||||
return;
|
||||
|
||||
_disableSelectionChangingEvent = true;
|
||||
|
||||
var treePath = new List<ViewModels.BranchTreeNode>();
|
||||
FindTreePath(treePath, Nodes, branch.Name, 0);
|
||||
|
||||
if (treePath.Count == 0)
|
||||
{
|
||||
_disableSelectionChangingEvent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var oldRowCount = Rows.Count;
|
||||
var rows = Rows;
|
||||
|
@ -276,7 +271,6 @@ namespace SourceGit.Views
|
|||
var target = treePath[treePath.Count - 1];
|
||||
BranchesPresenter.SelectedItem = target;
|
||||
BranchesPresenter.ScrollIntoView(target);
|
||||
_disableSelectionChangingEvent = false;
|
||||
|
||||
if (oldRowCount != rows.Count)
|
||||
RaiseEvent(new RoutedEventArgs(RowsChangedEvent));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue