From aaefe462bbc10641067fdc0d69fed90bdfca6107 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 28 May 2015 23:47:01 +0100 Subject: [PATCH] Popups: calling OpenPopup() on already open popup doesn't close it's child (#126) Fixed previous commit. --- imgui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 930075f5b..99007c797 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3059,7 +3059,10 @@ void ImGui::OpenPopup(const char* str_id) if (g.OpenedPopupStack.size() < current_stack_size + 1) g.OpenedPopupStack.push_back(popup_ref); else if (g.OpenedPopupStack[current_stack_size].PopupID != id) + { + g.OpenedPopupStack.resize(current_stack_size+1); g.OpenedPopupStack[current_stack_size] = popup_ref; + } } static void CloseInactivePopups()