fix: onSHAPressed avoid right click nav (#770)

- 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:
Alberto de la Cruz 2024-11-30 12:31:13 +01:00 committed by GitHub
parent 0b73f7b483
commit 22de6673bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,7 +151,9 @@ namespace SourceGit.Views
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);
}