fix: onSHAPressed avoid right click nav

- When the right click button is pressed it should not navigate to the parent. Navigation actions only should execute with the left button.
This commit is contained in:
adelacruz 2024-11-30 12:23:45 +01:00
parent 941ea4a695
commit 8cd0b2dd15

View file

@ -151,7 +151,9 @@ namespace SourceGit.Views
private void OnSHAPressed(object sender, PointerPressedEventArgs e) private void OnSHAPressed(object sender, PointerPressedEventArgs e)
{ {
if (DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha }) var point = e.GetCurrentPoint(this);
if (point.Properties.IsLeftButtonPressed && DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha })
{ {
detail.NavigateTo(sha); detail.NavigateTo(sha);
} }