mirror of https://github.com/ocornut/imgui
Fixed new collapsed auto-resizing window with saved .ini settings not calculating their initial width #176
This commit is contained in:
parent
2e26196aba
commit
4ee5a792ff
|
@ -2915,7 +2915,12 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl
|
|||
window->Size = window->SizeFull = size;
|
||||
}
|
||||
|
||||
if (ImLengthSqr(window->Size) < 0.00001f)
|
||||
if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0)
|
||||
{
|
||||
window->AutoFitFrames = 2;
|
||||
window->AutoFitOnlyGrows = false;
|
||||
}
|
||||
else if (ImLengthSqr(window->Size) < 0.00001f)
|
||||
{
|
||||
window->AutoFitFrames = 2;
|
||||
window->AutoFitOnlyGrows = true;
|
||||
|
|
Loading…
Reference in New Issue