1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 01:20:55 +01:00

Fix SetNextWindowContentSize() with 0.0f on Y axis (or SetNextWindowContentWidth()) overwriting the contents size. Broken in eab6333a0b. (#1363)

This commit is contained in:
omar 2018-01-25 15:37:24 +01:00
parent 8bf0c89c0d
commit 5d31e1696f

View File

@ -4544,7 +4544,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
{
// Adjust passed "client size" to become a "window size"
window->SizeContentsExplicit = g.NextWindowData.ContentSizeVal;
window->SizeContentsExplicit.y += window->TitleBarHeight() + window->MenuBarHeight();
if (window->SizeContentsExplicit.y != 0.0f)
window->SizeContentsExplicit.y += window->TitleBarHeight() + window->MenuBarHeight();
g.NextWindowData.ContentSizeCond = 0;
}
else if (first_begin_of_the_frame)