mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
optimize<DiffViewer>: hide all text diff contents after reset
This commit is contained in:
parent
2ba6a08475
commit
c7c0c07062
1 changed files with 8 additions and 1 deletions
|
@ -80,6 +80,9 @@ namespace SourceGit.Views.Widgets {
|
|||
noChange.Visibility = Visibility.Collapsed;
|
||||
sizeChange.Visibility = Visibility.Collapsed;
|
||||
ClearCache();
|
||||
|
||||
foreach (var e in editors) e.ItemsSource = null;
|
||||
foreach (var s in splitters) s.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
public void Diff(string repo, Option opt) {
|
||||
|
@ -250,6 +253,8 @@ namespace SourceGit.Views.Widgets {
|
|||
splitters[0].Margin = new Thickness(Math.Floor(lineNumberWidth), 0, 0, 0);
|
||||
splitters[1].Margin = new Thickness(Math.Floor(lineNumberWidth) * 2, 0, 0, 0);
|
||||
}
|
||||
|
||||
foreach (var s in splitters) s.Visibility = Visibility.Visible;
|
||||
|
||||
editor.Columns[0].Width = new DataGridLength(lineNumberWidth, DataGridLengthUnitType.Pixel);
|
||||
editor.Columns[1].Width = new DataGridLength(lineNumberWidth, DataGridLengthUnitType.Pixel);
|
||||
|
@ -333,7 +338,9 @@ namespace SourceGit.Views.Widgets {
|
|||
splitters[0].Margin = new Thickness(Math.Floor(lineNumberWidth), 0, 0, 0);
|
||||
splitters[2].Margin = new Thickness(Math.Floor(lineNumberWidth), 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
foreach (var s in splitters) s.Visibility = Visibility.Visible;
|
||||
|
||||
oldEditor.Columns[0].Width = new DataGridLength(lineNumberWidth, DataGridLengthUnitType.Pixel);
|
||||
oldEditor.Columns[1].MinWidth = minWidth;
|
||||
oldEditor.SetBinding(DataGrid.ItemsSourceProperty, new Binding() { Source = oldSideBlocks, IsAsync = true });
|
||||
|
|
Loading…
Reference in a new issue