1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-14 00:34:18 +00:00

Docking: Fix docked window contents not rendering when switching with CTRL+Tab.

(regression from 8eb8689).
This commit is contained in:
Rokas Kupstys 2022-07-12 16:21:44 +03:00 committed by ocornut
parent 77637fd936
commit cb8ead1f71
3 changed files with 5 additions and 3 deletions

View file

@ -15218,7 +15218,7 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
if (node->TabBar && node->TabBar->SelectedTabId)
node->SelectedTabId = node->TabBar->SelectedTabId;
else if (node->Windows.Size > 0)
node->SelectedTabId = node->Windows[0]->ID;
node->SelectedTabId = node->Windows[0]->TabId;
// Draw payload drop target
if (host_window && node->IsVisible)
@ -15456,7 +15456,7 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w
// Apply NavWindow focus back to the tab bar
if (g.NavWindow && g.NavWindow->RootWindow->DockNode == node)
tab_bar->SelectedTabId = g.NavWindow->RootWindow->ID;
tab_bar->SelectedTabId = g.NavWindow->RootWindow->TabId;
// Selected newly added tabs, or persistent tab ID if the tab bar was just recreated
if (tab_bar_is_recreated && TabBarFindTabByID(tab_bar, node->SelectedTabId) != NULL)