From 1575a3fbcdcea3ea85639cf098c7909f33270cae Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 19 May 2019 17:00:17 +0200 Subject: [PATCH] Docking: Fixed temporarily losing Dockspace flag when merging remaining sibling back into a parent node. (#2563, #2109) Would trigger an assert in the Passthru hole path. Broken by fd5859ed. --- imgui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index e64b6d33..2d1e0d2a 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -12929,7 +12929,9 @@ void ImGui::DockNodeTreeMerge(ImGuiContext* ctx, ImGuiDockNode* parent_node, ImG parent_node->SizeRef = backup_last_explicit_size; // Flags transfer - parent_node->LocalFlags = ((child_0 ? child_0->LocalFlags : 0) | (child_1 ? child_1->LocalFlags : 0)) & ImGuiDockNodeFlags_LocalFlagsTransferMask_; + parent_node->LocalFlags &= ~ImGuiDockNodeFlags_LocalFlagsTransferMask_; // Preserve Dockspace flag + parent_node->LocalFlags |= (child_0 ? child_0->LocalFlags : 0) & ImGuiDockNodeFlags_LocalFlagsTransferMask_; + parent_node->LocalFlags |= (child_1 ? child_1->LocalFlags : 0) & ImGuiDockNodeFlags_LocalFlagsTransferMask_; if (child_0) {