diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index db36d6ed4..19c50a0e4 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -650,29 +650,24 @@ namespace hex::plugin::builtin { callback(address, data, size); } - const auto &tooltips = ImHexApi::HexEditor::impl::getTooltips(); - if (!tooltips.empty()) { - ImGui::BeginTooltip(); - - for (const auto &[id, tooltip] : tooltips) { + for (const auto &[id, tooltip] : ImHexApi::HexEditor::impl::getTooltips()) { + if (tooltip.getRegion().overlaps({ address, size })) { + ImGui::BeginTooltip(); if (ImGui::BeginTable("##tooltips", 1, ImGuiTableFlags_NoHostExtendX | ImGuiTableFlags_RowBg | ImGuiTableFlags_NoClip)) { ImGui::TableNextRow(); ImGui::TableNextColumn(); - if (tooltip.getRegion().overlaps({ address, size })) { - ImGui::ColorButton(tooltip.getValue().c_str(), ImColor(tooltip.getColor())); - ImGui::SameLine(0, 10); - ImGui::TextUnformatted(tooltip.getValue().c_str()); - } + ImGui::ColorButton(tooltip.getValue().c_str(), ImColor(tooltip.getColor())); + ImGui::SameLine(0, 10); + ImGui::TextUnformatted(tooltip.getValue().c_str()); ImGui::PushStyleColor(ImGuiCol_TableRowBg, tooltip.getColor()); ImGui::PushStyleColor(ImGuiCol_TableRowBgAlt, tooltip.getColor()); ImGui::EndTable(); ImGui::PopStyleColor(2); } + ImGui::EndTooltip(); } - - ImGui::EndTooltip(); } ImGui::PopStyleVar(); diff --git a/plugins/builtin/source/lang/zh_CN.cpp b/plugins/builtin/source/lang/zh_CN.cpp index 8f6843734..e0e421755 100644 --- a/plugins/builtin/source/lang/zh_CN.cpp +++ b/plugins/builtin/source/lang/zh_CN.cpp @@ -412,6 +412,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.yara.header.rules", "规则" }, { "hex.builtin.view.yara.reload", "重新加载" }, { "hex.builtin.view.yara.match", "匹配规则" }, + //{ "hex.builtin.view.yara.reset", "Reset" }, { "hex.builtin.view.yara.matching", "匹配中..." }, { "hex.builtin.view.yara.error", "Yara 编译器错误: " }, { "hex.builtin.view.yara.header.matches", "匹配" }, diff --git a/plugins/builtin/source/lang/zh_TW.cpp b/plugins/builtin/source/lang/zh_TW.cpp index ab244f805..b6bd7475e 100644 --- a/plugins/builtin/source/lang/zh_TW.cpp +++ b/plugins/builtin/source/lang/zh_TW.cpp @@ -409,6 +409,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.yara.header.rules", "規則" }, { "hex.builtin.view.yara.reload", "重新載入" }, { "hex.builtin.view.yara.match", "Match Rules" }, + //{ "hex.builtin.view.yara.reset", "Reset" }, { "hex.builtin.view.yara.matching", "Matching..." }, { "hex.builtin.view.yara.error", "Yara 編譯器錯誤:" }, { "hex.builtin.view.yara.header.matches", "Matches" },