Skip to content

Commit 84e8802

Browse files
GamingMinds-DanielCocornut
authored andcommitted
Docking: on node split, update memorized DockId for currently closed windows (#3716)
Amended by @ocornut with same fix in DockBuilderRemoveNodeChildNodes().
1 parent 577e7cb commit 84e8802

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

imgui.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14190,6 +14190,7 @@ void ImGui::DockNodeTreeSplit(ImGuiContext* ctx, ImGuiDockNode* parent_node, ImG
1419014190
child_1->SizeRef[split_axis] = ImFloor(size_avail - child_0->SizeRef[split_axis]);
1419114191

1419214192
DockNodeMoveWindows(parent_node->ChildNodes[split_inheritor_child_idx], parent_node);
14193+
DockSettingsRenameNodeReferences(parent_node->ID, parent_node->ChildNodes[split_inheritor_child_idx]->ID);
1419314194
DockNodeTreeUpdatePosSize(parent_node, parent_node->Pos, parent_node->Size);
1419414195

1419514196
// Flags transfer (e.g. this is where we transfer the ImGuiDockNodeFlags_CentralNode property)
@@ -14815,7 +14816,10 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id)
1481514816
if (root_id != 0)
1481614817
DockContextQueueNotifyRemovedNode(ctx, node);
1481714818
if (root_node)
14819+
{
1481814820
DockNodeMoveWindows(root_node, node);
14821+
DockSettingsRenameNodeReferences(node->ID, root_node->ID);
14822+
}
1481914823
nodes_to_remove.push_back(node);
1482014824
}
1482114825
}

0 commit comments

Comments
 (0)