mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: avoid re-calcuting highlight chunk when move mouse from stage/unstage buttons to text area
This commit is contained in:
parent
99c2ffeef4
commit
e945367b28
1 changed files with 10 additions and 0 deletions
|
@ -513,7 +513,17 @@ namespace SourceGit.Views
|
||||||
private void OnTextViewPointerEntered(object sender, PointerEventArgs e)
|
private void OnTextViewPointerEntered(object sender, PointerEventArgs e)
|
||||||
{
|
{
|
||||||
if (EnableChunkSelection && sender is TextView view)
|
if (EnableChunkSelection && sender is TextView view)
|
||||||
|
{
|
||||||
|
var chunk = SelectedChunk;
|
||||||
|
if (chunk != null)
|
||||||
|
{
|
||||||
|
var rect = new Rect(0, chunk.Y, Bounds.Width, chunk.Height);
|
||||||
|
if (rect.Contains(e.GetPosition(this)))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateSelectedChunk(e.GetPosition(view).Y + view.VerticalOffset);
|
UpdateSelectedChunk(e.GetPosition(view).Y + view.VerticalOffset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTextViewPointerMoved(object sender, PointerEventArgs e)
|
private void OnTextViewPointerMoved(object sender, PointerEventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue