Internals: Fixed CalcSizeContents() returning negative value on first run (inconsequential afaik, but fixing for sanity)

docking
omar 6 years ago
parent 17f36038e0
commit dc021f1c23

@ -5841,6 +5841,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)
{

Loading…
Cancel
Save