Docking: Focus fix (missing line in 8bac6d4)

This commit is contained in:
omar 2018-12-04 13:34:16 +01:00
parent 5105c6c0d0
commit 8cac70d8af

View File

@ -5811,7 +5811,7 @@ void ImGui::FocusWindow(ImGuiWindow* window)
// Select in dock node // Select in dock node
if (window->DockNode && window->DockNode->TabBar) if (window->DockNode && window->DockNode->TabBar)
window->DockNode->TabBar->SelectedTabId = window->ID; window->DockNode->TabBar->SelectedTabId = window->DockNode->TabBar->NextSelectedTabId = window->ID;
// Move the root window to the top of the pile // Move the root window to the top of the pile
if (window->RootWindow) if (window->RootWindow)
@ -12301,6 +12301,8 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open)
// Bind to our dock node // Bind to our dock node
ImGuiDockNode* dock_node = window->DockNode; ImGuiDockNode* dock_node = window->DockNode;
if (dock_node != NULL)
IM_ASSERT(window->DockId == dock_node->ID);
if (window->DockId != 0 && dock_node == NULL) if (window->DockId != 0 && dock_node == NULL)
{ {
dock_node = DockContextFindNodeByID(ctx, window->DockId); dock_node = DockContextFindNodeByID(ctx, window->DockId);