From 0a5557328868bb331804ebb8e114d58ec6a28d37 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 25 Sep 2017 15:48:52 +0200 Subject: [PATCH] Begin(): Minor tidying up of flow --- imgui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 5de150028..310cfe2c0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4143,13 +4143,13 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (window->AutoFitFramesY > 0) window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y; } - else + else if (!window_size_set_by_api) { - if ((flags & ImGuiWindowFlags_AlwaysAutoResize) && !window_size_set_by_api) + if (flags & ImGuiWindowFlags_AlwaysAutoResize) { window->SizeFull = size_auto_fit; } - else if ((window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) && !window_size_set_by_api) + else if (window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) { // Auto-fit only grows during the first few frames if (window->AutoFitFramesX > 0)