mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -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,8 +513,18 @@ 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