mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Docking: Agressively assert when CentralNode is a not a leaf node in order to find our bug.
This commit is contained in:
parent
e194219f2e
commit
4ea9fdbbea
@ -10695,6 +10695,7 @@ static void DockNodeUpdateScanRec(ImGuiDockNode* node, ImGuiDockNodeUpdateScanRe
|
|||||||
if (node->IsCentralNode)
|
if (node->IsCentralNode)
|
||||||
{
|
{
|
||||||
IM_ASSERT(results->CentralNode == NULL); // Should be only one
|
IM_ASSERT(results->CentralNode == NULL); // Should be only one
|
||||||
|
IM_ASSERT(node->IsLeafNode() && "If you get this assert: your .ini file may have been damaged by an old bug. OR please submit repro of actions leading to this");
|
||||||
results->CentralNode = node;
|
results->CentralNode = node;
|
||||||
}
|
}
|
||||||
if (results->CountNodesWithWindows > 1 && results->CentralNode != NULL)
|
if (results->CountNodesWithWindows > 1 && results->CentralNode != NULL)
|
||||||
@ -11916,7 +11917,7 @@ void ImGui::SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond)
|
|||||||
dock_id = new_node->CentralNode->ID;
|
dock_id = new_node->CentralNode->ID;
|
||||||
else
|
else
|
||||||
dock_id = new_node->LastFocusedNodeID;
|
dock_id = new_node->LastFocusedNodeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->DockId == dock_id)
|
if (window->DockId == dock_id)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user