From 22157a5c98bee2121ff20b87787ba1b1063bdf5e Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 21 Nov 2024 10:04:44 +0800 Subject: [PATCH] fix: tooltip of parent SHA textblock is not closed properly (#727) Signed-off-by: leo --- src/Views/CommitBaseInfo.axaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Views/CommitBaseInfo.axaml.cs b/src/Views/CommitBaseInfo.axaml.cs index 6a4af344..64fb4189 100644 --- a/src/Views/CommitBaseInfo.axaml.cs +++ b/src/Views/CommitBaseInfo.axaml.cs @@ -136,10 +136,12 @@ namespace SourceGit.Views else { var c = await Task.Run(() => detail.GetParent(sha)); - if (c != null) + if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha) { ToolTip.SetTip(ctl, c); - ToolTip.SetIsOpen(ctl, ctl.IsPointerOver); + + if (ctl.IsPointerOver) + ToolTip.SetIsOpen(ctl, true); } } }