From e1acb0b1faaacb0f3b96bfa11b3f992bb51ab06d Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 11 Mar 2019 19:46:37 +0100 Subject: [PATCH] Docking: Fixed node merging altering window position incorrectly in a way that would make SizeContents incorrect for the next frame (making scrollbar flicker). (#2414, #2109) --- imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 48591b2a..53316f2c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11536,8 +11536,8 @@ static void ImGui::DockNodeApplyPosSizeToWindows(ImGuiDockNode* node) { for (int n = 0; n < node->Windows.Size; n++) { - node->Windows[n]->Pos = node->Pos; - node->Windows[n]->SizeFull = node->Size; + SetWindowPos(node->Windows[n], node->Pos, ImGuiCond_Always); // We don't assign directly to Pos because it can break the calculation of SizeContents on next frame + SetWindowSize(node->Windows[n], node->Size, ImGuiCond_Always); } }