From 4598fc098d476ba67979aa10d115868281d040a2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 31 Aug 2025 22:17:36 +0200 Subject: [PATCH] fix: ImGui ID not getting popped correctly --- plugins/builtin/source/content/views/view_pattern_data.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp index 940c8add8..c04372a22 100644 --- a/plugins/builtin/source/content/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -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(); } }