From 8cd0b2dd154f4900fbddca9c6973e2d99679206d Mon Sep 17 00:00:00 2001 From: adelacruz Date: Sat, 30 Nov 2024 12:23:45 +0100 Subject: [PATCH] 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. --- 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); }