From 96ddfbc97342c8c4750cf66a05cae285afc26e6f Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 1 Feb 2018 23:36:22 +0100 Subject: [PATCH] Nav: Modal windows can't be closed with Nav PadCancel. (#787) --- imgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index bd0ec45a..a1ab36eb 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3005,7 +3005,8 @@ static void ImGui::NavUpdate() else if (g.OpenPopupStack.Size > 0) { // Close open popup/menu - ClosePopupToLevel(g.OpenPopupStack.Size - 1); + if (!(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal)) + ClosePopupToLevel(g.OpenPopupStack.Size - 1); } else if (g.NavLayer != 0) {