From 22de6673bcd9f6101990e2ab9790bc36aff0ace1 Mon Sep 17 00:00:00 2001 From: Alberto de la Cruz <32411964+albertodlc@users.noreply.github.com> Date: Sat, 30 Nov 2024 12:31:13 +0100 Subject: [PATCH] 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. --- src/Views/CommitBaseInfo.axaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Views/CommitBaseInfo.axaml.cs b/src/Views/CommitBaseInfo.axaml.cs index 264ff779..57592647 100644 --- a/src/Views/CommitBaseInfo.axaml.cs +++ b/src/Views/CommitBaseInfo.axaml.cs @@ -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); }