From 2e5860b5a0c14412ae209819ca19891ba3f7276d Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 18 May 2019 13:00:00 +0200 Subject: [PATCH] Docking: Fixed incomplete merge of 36e714a leading to undocking. #2109 --- imgui.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 14a33004..26b39a98 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -13724,8 +13724,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) // Calling SetNextWindowPos() undock windows by default (by setting PosUndock) bool want_undock = false; want_undock |= (window->Flags & ImGuiWindowFlags_NoDocking) != 0; - want_undock |= (g.NextWindowData.PosCond && (window->SetWindowPosAllowFlags & g.NextWindowData.PosCond) && g.NextWindowData.PosUndock); - g.NextWindowData.PosUndock = false; + want_undock |= (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos) && (window->SetWindowPosAllowFlags & g.NextWindowData.PosCond) && g.NextWindowData.PosUndock; if (want_undock) { DockContextProcessUndockWindow(ctx, window);