mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-13 00:24:20 +00:00
Docking: Fixed splitting/docking into a node that has buttons amended into tab bar. Windows were not moved correctly. (#5515)
This commit is contained in:
parent
e21f462f6f
commit
0abe7d1cc5
1 changed files with 6 additions and 2 deletions
|
|
@ -14738,10 +14738,14 @@ static void ImGui::DockNodeMoveWindows(ImGuiDockNode* dst_node, ImGuiDockNode* s
|
|||
src_node->TabBar = NULL;
|
||||
}
|
||||
|
||||
for (int n = 0; n < src_node->Windows.Size; n++)
|
||||
for (int n_from_node = 0, n_from_tab_bar = 0; n_from_node < src_node->Windows.Size; n_from_node++, n_from_tab_bar++)
|
||||
{
|
||||
// DockNode's TabBar may have non-window Tabs manually appended by user
|
||||
if (ImGuiWindow* window = src_tab_bar ? src_tab_bar->Tabs[n].Window : src_node->Windows[n])
|
||||
while (src_tab_bar && src_tab_bar->Tabs[n_from_tab_bar].Window == NULL)
|
||||
n_from_tab_bar++;
|
||||
|
||||
// Using TabBar order (FIXME: Why? Clarify + add tests for it)
|
||||
if (ImGuiWindow* window = src_tab_bar ? src_tab_bar->Tabs[n_from_tab_bar].Window : src_node->Windows[n_from_node])
|
||||
{
|
||||
window->DockNode = NULL;
|
||||
window->DockIsActive = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue