1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-15 19:43:28 +01: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

@ -135,6 +135,8 @@ Docking+Viewports Branch:
- Docking, Nav: Fixed using gamepad/keyboard navigation not being able enter menu layer when
it only contained the standard Collapse/Close buttons and no actual menu. (#5463, #4792)
- Docking: Fixed regression introduced in v1.87 when docked window content not rendered
while switching between with CTRL+Tab. [@rokups]
- Backends: GLFW: Fixed leftover static variable preventing from changing or
reinitializing backend while application is running. (#4616, #5434) [@rtoumazet]

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)

View File

@ -7694,7 +7694,7 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar)
// CTRL+TAB can override visible tab temporarily
if (g.NavWindowingTarget != NULL && g.NavWindowingTarget->DockNode && g.NavWindowingTarget->DockNode->TabBar == tab_bar)
tab_bar->VisibleTabId = scroll_to_tab_id = g.NavWindowingTarget->ID;
tab_bar->VisibleTabId = scroll_to_tab_id = g.NavWindowingTarget->TabId;
// Update scrolling
if (scroll_to_tab_id != 0)