fix: ImGui ID not getting popped correctly

This commit is contained in:
WerWolv
2025-08-31 22:17:36 +02:00
parent 2f6fde1e61
commit 4598fc098d

View File

@@ -119,6 +119,7 @@ namespace hex::plugin::builtin {
static i32 selectedSection = -1;
for (auto &[id, drawer] : *m_patternDrawer) {
ImGui::PushID(id + 1);
ON_SCOPE_EXIT { ImGui::PopID(); };
drawer->enablePatternEditing(ImHexApi::Provider::get()->isWritable());
// If the runtime has finished evaluating, draw the patterns
@@ -151,8 +152,6 @@ namespace hex::plugin::builtin {
}
}
}
ImGui::PopID();
}
}