mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
code_style: code cleanup
This commit is contained in:
parent
012e28ec8d
commit
98fdff7543
1 changed files with 9 additions and 13 deletions
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
@ -110,11 +109,9 @@ namespace SourceGit.Views
|
||||||
};
|
};
|
||||||
|
|
||||||
var selection = new Models.TreeDataGridSelectionModel<ViewModels.FileTreeNode>(source, x => x.Children);
|
var selection = new Models.TreeDataGridSelectionModel<ViewModels.FileTreeNode>(source, x => x.Children);
|
||||||
|
selection.SingleSelect = SingleSelect;
|
||||||
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
||||||
|
selection.SelectionChanged += (s, _) =>
|
||||||
source.Selection = selection;
|
|
||||||
source.RowSelection.SingleSelect = SingleSelect;
|
|
||||||
source.RowSelection.SelectionChanged += (s, _) =>
|
|
||||||
{
|
{
|
||||||
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<ViewModels.FileTreeNode> model)
|
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<ViewModels.FileTreeNode> model)
|
||||||
{
|
{
|
||||||
|
@ -128,6 +125,7 @@ namespace SourceGit.Views
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
source.Selection = selection;
|
||||||
tree.Source = source;
|
tree.Source = source;
|
||||||
}
|
}
|
||||||
else if (viewMode == Models.ChangeViewMode.List)
|
else if (viewMode == Models.ChangeViewMode.List)
|
||||||
|
@ -138,11 +136,9 @@ namespace SourceGit.Views
|
||||||
};
|
};
|
||||||
|
|
||||||
var selection = new Models.TreeDataGridSelectionModel<Models.Change>(source, null);
|
var selection = new Models.TreeDataGridSelectionModel<Models.Change>(source, null);
|
||||||
|
selection.SingleSelect = SingleSelect;
|
||||||
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
||||||
|
selection.SelectionChanged += (s, _) =>
|
||||||
source.Selection = selection;
|
|
||||||
source.RowSelection.SingleSelect = SingleSelect;
|
|
||||||
source.RowSelection.SelectionChanged += (s, _) =>
|
|
||||||
{
|
{
|
||||||
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<Models.Change> model)
|
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<Models.Change> model)
|
||||||
{
|
{
|
||||||
|
@ -156,6 +152,7 @@ namespace SourceGit.Views
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
source.Selection = selection;
|
||||||
tree.Source = source;
|
tree.Source = source;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -170,11 +167,9 @@ namespace SourceGit.Views
|
||||||
};
|
};
|
||||||
|
|
||||||
var selection = new Models.TreeDataGridSelectionModel<Models.Change>(source, null);
|
var selection = new Models.TreeDataGridSelectionModel<Models.Change>(source, null);
|
||||||
|
selection.SingleSelect = SingleSelect;
|
||||||
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
selection.RowDoubleTapped += (_, e) => RaiseEvent(new RoutedEventArgs(ChangeDoubleTappedEvent));
|
||||||
|
selection.SelectionChanged += (s, _) =>
|
||||||
source.Selection = selection;
|
|
||||||
source.RowSelection.SingleSelect = SingleSelect;
|
|
||||||
source.RowSelection.SelectionChanged += (s, _) =>
|
|
||||||
{
|
{
|
||||||
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<Models.Change> model)
|
if (!_isSelecting && s is Models.TreeDataGridSelectionModel<Models.Change> model)
|
||||||
{
|
{
|
||||||
|
@ -188,6 +183,7 @@ namespace SourceGit.Views
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
source.Selection = selection;
|
||||||
tree.Source = source;
|
tree.Source = source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue