Docking: Fixed less of node size/pos caused by 1f2bdd37 (#2109)

This commit is contained in:
omar 2019-02-03 18:58:07 +01:00
parent 80d51c692a
commit f902435a53

View File

@ -10770,7 +10770,8 @@ ImGuiDockNode::ImGuiDockNode(ImGuiID id)
LastFocusedNodeID = 0;
SelectedTabID = 0;
WantCloseTabID = 0;
AutorityForPos = AutorityForSize = AutorityForViewport = ImGuiDataAutority_Auto;
AutorityForPos = AutorityForSize = ImGuiDataAutority_DockNode;
AutorityForViewport = ImGuiDataAutority_Auto;
IsVisible = true;
IsFocused = IsCentralNode = IsHiddenTabBar = HasCloseButton = HasCollapseButton = false;
WantCloseAll = WantLockSizeOnce = WantMouseMove = WantHiddenTabBarUpdate = WantHiddenTabBarToggle = false;
@ -11257,12 +11258,14 @@ static void ImGui::DockNodeUpdate(ImGuiDockNode* node)
// after the dock host window, losing their top-most status.
if (node->HostWindow->Appearing)
BringWindowToDisplayFront(node->HostWindow);
node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto;
}
else if (node->ParentNode)
{
node->HostWindow = host_window = node->ParentNode->HostWindow;
node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto;
}
node->AutorityForPos = node->AutorityForSize = node->AutorityForViewport = ImGuiDataAutority_Auto;
if (node->WantMouseMove && node->HostWindow)
DockNodeStartMouseMovingWindow(node, node->HostWindow);
}