1
0
mirror of synced 2025-01-11 05:42:15 +01:00

fix: Tooltips not being hidden when disabling hex editor highlights

This commit is contained in:
WerWolv 2024-12-30 23:45:48 +01:00
parent 89111059f9
commit a1482cb40e

View File

@ -586,6 +586,9 @@ namespace hex::plugin::builtin {
}); });
m_hexEditor.setHoverChangedCallback([this](u64 address, size_t size) { m_hexEditor.setHoverChangedCallback([this](u64 address, size_t size) {
if (!showHighlights)
return std::nullopt;
m_hoverHighlights->clear(); m_hoverHighlights->clear();
if (Region(address, size) == Region::Invalid()) 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) { 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()) { for (const auto &[id, callback] : ImHexApi::HexEditor::impl::getTooltipFunctions()) {
callback(address, data, size); callback(address, data, size);
} }