From 46e994de4e9b334e5bf56a9f6f33bf618c72cb9a Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 24 Nov 2017 16:54:03 +0100 Subject: [PATCH] Nav: Do not clear last navigation id stored in a hidden child window. (#787) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 53582450..c5a804d8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5054,7 +5054,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) } const bool window_just_appearing_after_hidden_for_resize = (window->HiddenFrames == 1); - if (window_just_appearing_after_hidden_for_resize) + if (window_just_appearing_after_hidden_for_resize && !(flags & ImGuiWindowFlags_ChildWindow)) window->NavLastIds[0] = 0; window->Appearing = (window_just_activated_by_user || window_just_appearing_after_hidden_for_resize); window->CloseButton = (p_open != NULL);