Docking: Fixed incomplete merge of 36e714a leading to undocking. #2109

This commit is contained in:
omar 2019-05-18 13:00:00 +02:00
parent 4158cba1ff
commit 2e5860b5a0

View File

@ -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);