fix: tooltip of parent SHA textblock is not closed properly (#727)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-21 10:04:44 +08:00
parent a980cc987d
commit 22157a5c98
No known key found for this signature in database

View file

@ -136,10 +136,12 @@ namespace SourceGit.Views
else else
{ {
var c = await Task.Run(() => detail.GetParent(sha)); 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.SetTip(ctl, c);
ToolTip.SetIsOpen(ctl, ctl.IsPointerOver);
if (ctl.IsPointerOver)
ToolTip.SetIsOpen(ctl, true);
} }
} }
} }