mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: ID collision with multiple items of the same name in the Accept Pattern popup
This commit is contained in:
@@ -103,6 +103,7 @@ namespace hex::plugin::builtin {
|
||||
if (ImGui::BeginListBox("##patterns_accept", ImVec2(400_scaled, 0))) {
|
||||
u32 index = 0;
|
||||
for (const auto &[path, author, description] : m_view->m_possiblePatternFiles.get(provider)) {
|
||||
ImGui::PushID(index + 1);
|
||||
auto fileName = wolv::util::toUTF8String(path.filename());
|
||||
|
||||
std::string displayValue;
|
||||
@@ -141,6 +142,8 @@ namespace hex::plugin::builtin {
|
||||
ImGuiExt::InfoTooltip(wolv::util::toUTF8String(path).c_str());
|
||||
|
||||
index++;
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
// Close the popup if there aren't any patterns available
|
||||
|
||||
Reference in New Issue
Block a user