mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Docking: Fixed another issue where the resulting node of a split would sometimes recall the pos/size of previous host window. Spent a whole day adding framework for testing more of docking so hopefully we'll heading toward the magical world of less regressions. (#2109)
This commit is contained in:
parent
712203dbcb
commit
433a7556c7
@ -11838,6 +11838,7 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
|
|||||||
ImGuiWindow* single_window = node->Windows[0];
|
ImGuiWindow* single_window = node->Windows[0];
|
||||||
node->Pos = single_window->Pos;
|
node->Pos = single_window->Pos;
|
||||||
node->Size = single_window->SizeFull;
|
node->Size = single_window->SizeFull;
|
||||||
|
node->AuthorityForPos = node->AuthorityForSize = node->AuthorityForViewport = ImGuiDataAuthority_Window;
|
||||||
|
|
||||||
// Transfer focus immediately so when we revert to a regular window it is immediately selected
|
// Transfer focus immediately so when we revert to a regular window it is immediately selected
|
||||||
if (node->HostWindow && g.NavWindow == node->HostWindow)
|
if (node->HostWindow && g.NavWindow == node->HostWindow)
|
||||||
@ -11855,7 +11856,6 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DockNodeHideHostWindow(node);
|
DockNodeHideHostWindow(node);
|
||||||
node->AuthorityForPos = node->AuthorityForSize = node->AuthorityForViewport = ImGuiDataAuthority_Window;
|
|
||||||
node->WantCloseAll = false;
|
node->WantCloseAll = false;
|
||||||
node->WantCloseTabID = 0;
|
node->WantCloseTabID = 0;
|
||||||
node->HasCloseButton = node->HasCollapseButton = false;
|
node->HasCloseButton = node->HasCollapseButton = false;
|
||||||
@ -12664,6 +12664,7 @@ void ImGui::DockNodeTreeSplit(ImGuiContext* ctx, ImGuiDockNode* parent_node, ImG
|
|||||||
parent_node->ChildNodes[split_inheritor_child_idx]->VisibleWindow = parent_node->VisibleWindow;
|
parent_node->ChildNodes[split_inheritor_child_idx]->VisibleWindow = parent_node->VisibleWindow;
|
||||||
parent_node->SplitAxis = split_axis;
|
parent_node->SplitAxis = split_axis;
|
||||||
parent_node->VisibleWindow = NULL;
|
parent_node->VisibleWindow = NULL;
|
||||||
|
parent_node->AuthorityForPos = parent_node->AuthorityForSize = ImGuiDataAuthority_DockNode;
|
||||||
|
|
||||||
float size_avail = (parent_node->Size[split_axis] - IMGUI_DOCK_SPLITTER_SIZE);
|
float size_avail = (parent_node->Size[split_axis] - IMGUI_DOCK_SPLITTER_SIZE);
|
||||||
size_avail = ImMax(size_avail, g.Style.WindowMinSize[split_axis] * 2.0f);
|
size_avail = ImMax(size_avail, g.Style.WindowMinSize[split_axis] * 2.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user