From 8cac70d8af05e7bcec1d558cc1ea36c33c14c0be Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 4 Dec 2018 13:34:16 +0100 Subject: [PATCH] Docking: Focus fix (missing line in 8bac6d4) --- imgui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index e4734d809..086c51514 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5811,7 +5811,7 @@ void ImGui::FocusWindow(ImGuiWindow* window) // Select in dock node 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 if (window->RootWindow) @@ -12301,6 +12301,8 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) // Bind to our dock node ImGuiDockNode* dock_node = window->DockNode; + if (dock_node != NULL) + IM_ASSERT(window->DockId == dock_node->ID); if (window->DockId != 0 && dock_node == NULL) { dock_node = DockContextFindNodeByID(ctx, window->DockId);