From ce18371d1bd331fc03c7ff22686bff1453b733f4 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 6 Jul 2018 19:24:54 +0200 Subject: [PATCH] Internals: Fixed CalcSizeContents() returning negative value on first run (inconsequential afaik, but fixing for sanity) --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index df05a2408..18df9d149 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6545,6 +6545,7 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl size = ImFloor(settings->Size); } window->Size = window->SizeFull = window->SizeFullAtLastBegin = size; + window->DC.CursorMaxPos = window->Pos; // So first call to CalcSizeContents() doesn't return crazy values if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0) {