Skip to content

Commit

Permalink
fix: Tooltips not being hidden when disabling hex editor highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Dec 30, 2024
1 parent 8911105 commit a1482cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/builtin/source/content/views/view_hex_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ namespace hex::plugin::builtin {
});

m_hexEditor.setHoverChangedCallback([this](u64 address, size_t size) {
if (!showHighlights)
return std::nullopt;

m_hoverHighlights->clear();

if (Region(address, size) == Region::Invalid())
Expand All @@ -598,6 +601,9 @@ namespace hex::plugin::builtin {
});

m_hexEditor.setTooltipCallback([](u64 address, const u8 *data, size_t size) {
if (!showHighlights)
return std::nullopt;

for (const auto &[id, callback] : ImHexApi::HexEditor::impl::getTooltipFunctions()) {
callback(address, data, size);
}
Expand Down

0 comments on commit a1482cb

Please sign in to comment.