revert: disable double-click folding/unfolding because it will cause IndexOutOfRange exception

This commit is contained in:
leo 2024-05-29 21:56:03 +08:00
parent a382a3e564
commit ea1bfad84d
6 changed files with 2 additions and 55 deletions

View file

@ -513,13 +513,6 @@ namespace SourceGit.ViewModels
var selection = new Models.TreeDataGridSelectionModel<FileTreeNode>(source, x => x.Children);
selection.SingleSelect = true;
selection.RowDoubleTapped += (s, e) =>
{
var model = s as Models.TreeDataGridSelectionModel<FileTreeNode>;
var node = model.SelectedItem;
if (node != null && node.IsFolder)
node.IsExpanded = !node.IsExpanded;
};
selection.SelectionChanged += (s, _) =>
{
if (s is Models.TreeDataGridSelectionModel<FileTreeNode> selection)