impr: Cleanup popup creation handling

This commit is contained in:
WerWolv
2025-08-18 20:06:42 +02:00
parent c5e0951def
commit 441dcea705

View File

@@ -524,14 +524,10 @@ namespace hex {
static double popupDelay = -2.0;
static u32 displayFrameCount = 0;
static std::unique_ptr<impl::PopupBase> currPopup;
static AutoReset<std::unique_ptr<impl::PopupBase>> currPopupStorage;
static Lang name("");
AT_FIRST_TIME {
EventImHexClosing::subscribe([] {
currPopup.reset();
});
};
auto &currPopup = *currPopupStorage;
if (auto &popups = impl::PopupBase::getOpenPopups(); !popups.empty()) {
if (!ImGui::IsPopupOpen(ImGuiID(0), ImGuiPopupFlags_AnyPopupId)) {