mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-20 23:06:36 +00:00
If we clear _ChildWindow flag we must remove it from here otherwise render loop will fail.
This commit is contained in:
parent
58f5092c53
commit
0eb45a0577
@ -13112,8 +13112,11 @@ void ImGui::DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node)
|
|||||||
DockSettingsRenameNodeReferences(node->ID, new_node->ID);
|
DockSettingsRenameNodeReferences(node->ID, new_node->ID);
|
||||||
for (int n = 0; n < new_node->Windows.Size; n++)
|
for (int n = 0; n < new_node->Windows.Size; n++)
|
||||||
{
|
{
|
||||||
new_node->Windows[n]->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
ImGuiWindow* window = new_node->Windows[n];
|
||||||
UpdateWindowParentAndRootLinks(new_node->Windows[n], new_node->Windows[n]->Flags, NULL);
|
window->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
||||||
|
if (window->ParentWindow)
|
||||||
|
window->ParentWindow->DC.ChildWindows.find_erase(window);
|
||||||
|
UpdateWindowParentAndRootLinks(window, window->Flags, NULL);
|
||||||
}
|
}
|
||||||
node = new_node;
|
node = new_node;
|
||||||
}
|
}
|
||||||
@ -13297,6 +13300,8 @@ static void ImGui::DockNodeRemoveWindow(ImGuiDockNode* node, ImGuiWindow* window
|
|||||||
window->DockIsActive = window->DockTabWantClose = false;
|
window->DockIsActive = window->DockTabWantClose = false;
|
||||||
window->DockId = save_dock_id;
|
window->DockId = save_dock_id;
|
||||||
window->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
window->Flags &= ~ImGuiWindowFlags_ChildWindow;
|
||||||
|
if (window->ParentWindow)
|
||||||
|
window->ParentWindow->DC.ChildWindows.find_erase(window);
|
||||||
UpdateWindowParentAndRootLinks(window, window->Flags, NULL); // Update immediately
|
UpdateWindowParentAndRootLinks(window, window->Flags, NULL); // Update immediately
|
||||||
|
|
||||||
// Remove window
|
// Remove window
|
||||||
|
Loading…
Reference in New Issue
Block a user