From 1c3dfc9b2fb3343af4a5ae045f38876d9c5e3122 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 23 Dec 2024 01:00:58 +0100 Subject: [PATCH] fix: ID collision in Jump To menu --- plugins/builtin/source/content/views/view_hex_editor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index e5587f61c..5fdc56777 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -1385,13 +1385,17 @@ namespace hex::plugin::builtin { return (value >= provider->getBaseAddress()) && (value < (provider->getBaseAddress() + provider->getActualSize())); }; + ImGui::PushID(1); if (ImGui::MenuItem(hex::format("0x{:08X}", littleEndianValue).c_str(), "hex.ui.common.little_endian"_lang, false, canJumpTo(littleEndianValue))) { ImHexApi::HexEditor::setSelection(littleEndianValue, 1); } + ImGui::PopID(); + ImGui::PushID(2); if (ImGui::MenuItem(hex::format("0x{:08X}", bigEndianValue).c_str(), "hex.ui.common.big_endian"_lang, false, canJumpTo(bigEndianValue))) { ImHexApi::HexEditor::setSelection(bigEndianValue, 1); } + ImGui::PopID(); if (ImGui::MenuItem("hex.builtin.view.hex_editor.menu.edit.jump_to.curr_pattern"_lang, "", false, selection.has_value() && ContentRegistry::PatternLanguage::getRuntime().getCreatedPatternCount() > 0)) { auto patterns = ContentRegistry::PatternLanguage::getRuntime().getPatternsAtAddress(selection->getStartAddress());