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.
docking
omar 6 years ago
parent 7e772f6a51
commit 1575a3fbcd

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

Loading…
Cancel
Save