From 90ff4ae5d16c2200cf6fdad2825ebb473d906899 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 28 Dec 2017 23:08:48 +0100 Subject: [PATCH] BeginPopupModal(): the conditional test for SetNextWindowPos() was polling the wrong window, which in practice made the test succeed all the time. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 3c6df7011..10ef65be3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3885,7 +3885,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags ext } // Center modal windows by default - if ((window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) == 0) + if (g.SetNextWindowPosCond == 0) SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings;