From a1482cb40e051f472a2346333e7a09487b476b05 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 30 Dec 2024 23:45:48 +0100 Subject: [PATCH] fix: Tooltips not being hidden when disabling hex editor highlights --- plugins/builtin/source/content/views/view_hex_editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 274dc4e09..1c36dcd02 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -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()) @@ -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); }