From 5c9ea4d53a864e412d01be3a0a9ac36062b0d5c7 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 1 Feb 2018 21:33:23 +0100 Subject: [PATCH] Nav: Fixed press Left on sub-menu when parent wasn't a menu - we were just checking at the wrong level. (#787) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 8febc940..01b9d0f8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11099,7 +11099,7 @@ void ImGui::EndMenu() // Nav: When a left move request within our child menu failed, close the menu ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; - if (g.NavWindow && g.NavWindow->ParentWindow == window && NavMoveRequestButNoResultYet() && g.NavMoveDir == ImGuiDir_Left && window->DC.LayoutType == ImGuiLayoutType_Vertical) + if (g.NavWindow == window && g.NavMoveDir == ImGuiDir_Left && NavMoveRequestButNoResultYet() && window->DC.LayoutType == ImGuiLayoutType_Vertical) { ClosePopupToLevel(g.OpenPopupStack.Size - 1); NavMoveRequestCancel();