mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
fix: NRE raised while clicking the issue link in commit detail message
This is because that `e.Pointer.Capture(null)` will raise the `PointerExited` event Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -110,16 +110,17 @@ namespace SourceGit.Views
|
||||
if (_lastHover != null)
|
||||
{
|
||||
var link = _lastHover.Link;
|
||||
var type = _lastHover.Type;
|
||||
e.Pointer.Capture(null);
|
||||
|
||||
if (_lastHover.Type == Models.InlineElementType.CommitSHA)
|
||||
if (type == Models.InlineElementType.CommitSHA)
|
||||
{
|
||||
var parentView = this.FindAncestorOfType<CommitBaseInfo>();
|
||||
if (parentView is { DataContext: ViewModels.CommitDetail detail })
|
||||
{
|
||||
if (point.Properties.IsLeftButtonPressed)
|
||||
{
|
||||
detail.NavigateTo(_lastHover.Link);
|
||||
detail.NavigateTo(link);
|
||||
}
|
||||
else if (point.Properties.IsRightButtonPressed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user