mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
fix<DiffViewer>: clear all editor grid lines before redraw
This commit is contained in:
parent
8ac28ff9e5
commit
ed5ebfaee7
1 changed files with 8 additions and 2 deletions
|
@ -91,7 +91,8 @@ namespace SourceGit.UI {
|
|||
sizeChange.Visibility = Visibility.Collapsed;
|
||||
noChange.Visibility = Visibility.Collapsed;
|
||||
|
||||
foreach (var editor in editors) editorContainer.Children.Remove(editor);
|
||||
editorContainer.Children.Clear();
|
||||
editorLines.Children.Clear();
|
||||
editors.Clear();
|
||||
|
||||
editorLines.Children.Clear();
|
||||
|
@ -193,6 +194,7 @@ namespace SourceGit.UI {
|
|||
editorContainer.Children.Add(editor);
|
||||
editors.Add(editor);
|
||||
|
||||
editorLines.ColumnDefinitions.Clear();
|
||||
editorLines.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(lineNumberWidth) });
|
||||
editorLines.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(lineNumberWidth) });
|
||||
|
||||
|
@ -270,6 +272,7 @@ namespace SourceGit.UI {
|
|||
editors.Add(oldEditor);
|
||||
editors.Add(newEditor);
|
||||
|
||||
editorLines.ColumnDefinitions.Clear();
|
||||
editorLines.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(lineNumberWidth) });
|
||||
editorLines.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
|
||||
editorLines.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(lineNumberWidth) });
|
||||
|
@ -608,7 +611,10 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ChangeDiffMode(object sender, RoutedEventArgs e) {
|
||||
foreach (var editor in editors) editorContainer.Children.Remove(editor);
|
||||
if (!IsLoaded) return;
|
||||
|
||||
editorContainer.Children.Clear();
|
||||
editorLines.Children.Clear();
|
||||
editors.Clear();
|
||||
|
||||
SetTextChange();
|
||||
|
|
Loading…
Reference in a new issue