From dfa145e16c700532a315a3df262f2e4639c285c3 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 28 Nov 2024 17:00:43 -0500 Subject: [PATCH] Do not clear highlighted symbol when hovering mouse over an unpaired symbol --- objdiff-gui/src/views/symbol_diff.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/objdiff-gui/src/views/symbol_diff.rs b/objdiff-gui/src/views/symbol_diff.rs index 2e8ca50..cc37edf 100644 --- a/objdiff-gui/src/views/symbol_diff.rs +++ b/objdiff-gui/src/views/symbol_diff.rs @@ -561,20 +561,16 @@ fn symbol_ui( } } } else if response.hovered() { - ret = Some(if let Some(target_symbol) = symbol_diff.target_symbol { - if column == 0 { - DiffViewAction::SetSymbolHighlight( - Some(symbol_diff.symbol_ref), - Some(target_symbol), - ) - } else { - DiffViewAction::SetSymbolHighlight( - Some(target_symbol), - Some(symbol_diff.symbol_ref), - ) - } + ret = Some(if column == 0 { + DiffViewAction::SetSymbolHighlight( + Some(symbol_diff.symbol_ref), + symbol_diff.target_symbol, + ) } else { - DiffViewAction::SetSymbolHighlight(None, None) + DiffViewAction::SetSymbolHighlight( + symbol_diff.target_symbol, + Some(symbol_diff.symbol_ref), + ) }); } ret