mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: do NOT redraw commit graph if vertical scroll of commit list not changed
This commit is contained in:
parent
ce2340456e
commit
ddcab64940
1 changed files with 8 additions and 1 deletions
|
@ -647,7 +647,12 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
private void OnCommitListLayoutUpdated(object _1, EventArgs _2)
|
private void OnCommitListLayoutUpdated(object _1, EventArgs _2)
|
||||||
{
|
{
|
||||||
CommitGraph.InvalidateVisual();
|
var y = CommitListContainer.Scroll?.Offset.Y ?? 0;
|
||||||
|
if (y != _lastScrollY)
|
||||||
|
{
|
||||||
|
_lastScrollY = y;
|
||||||
|
CommitGraph.InvalidateVisual();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCommitListSelectionChanged(object _, SelectionChangedEventArgs e)
|
private void OnCommitListSelectionChanged(object _, SelectionChangedEventArgs e)
|
||||||
|
@ -695,5 +700,7 @@ namespace SourceGit.Views
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private double _lastScrollY = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue