From 11116eee8068d285397930cd08b5486990533ccf Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 2 Apr 2020 20:01:48 +0200 Subject: [PATCH] Columns: undid the change in 1.75 were Columns()/BeginColumns() were preemptively limited to 64 columns with an assert. (#3037, #125) Essentially reverting 9d444062f974b21f1fc09b7e85479fff3e0789c2. --- docs/CHANGELOG.txt | 3 +++ imgui.cpp | 2 +- imgui_widgets.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index adc5fac2d451..bec2d702bd24 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -64,6 +64,8 @@ Other Changes: - sizeof(ImWchar) goes from 2 to 4. IM_UNICODE_CODEPOINT_MAX goes from 0xFFFF to 0x10FFFF. - Various structures such as ImFont, ImFontGlyphRangesBuilder will use more memory, this is currently not particularly efficient. +- Columns: undid the change in 1.75 were Columns()/BeginColumns() were preemptively limited + to 64 columns with an assert. (#3037, #125) - Window: Fixed a bug with child window inheriting ItemFlags from their parent when the child window also manipulate the ItemFlags stack. (#3024) [@Stanbroek] - Font: Fixed non-ASCII space occasionally creating unnecessary empty polygons. @@ -121,6 +123,7 @@ Breaking Changes: - ImDrawList::AddCircle()/AddCircleFilled() functions don't accept negative radius. - Limiting Columns()/BeginColumns() api to 64 columns with an assert. While the current code technically supports it, future code may not so we're putting the restriction ahead. + [Undid that change in 1.76] - imgui_internal.h: changed ImRect() default constructor initializes all fields to 0.0f instead of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). If you used ImRect::Add() to create bounding boxes by adding points into it without explicit initialization, you may need to fix your initial value. diff --git a/imgui.cpp b/imgui.cpp index 2d3f3164f6b5..99689a4304d9 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -367,7 +367,7 @@ CODE You can read releases logs https://github.com/ocornut/imgui/releases for more details. - 2020/01/22 (1.75) - ImDrawList::AddCircle()/AddCircleFilled() functions don't accept negative radius any more. - - 2019/12/17 (1.75) - made Columns() limited to 64 columns by asserting above that limit. While the current code technically supports it, future code may not so we're putting the restriction ahead. + - 2019/12/17 (1.75) - [undid this change in 1.76] made Columns() limited to 64 columns by asserting above that limit. While the current code technically supports it, future code may not so we're putting the restriction ahead. - 2019/12/13 (1.75) - [imgui_internal.h] changed ImRect() default constructor initializes all fields to 0.0f instead of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). If you used ImRect::Add() to create bounding boxes by adding multiple points into it, you may need to fix your initial value. - 2019/12/08 (1.75) - removed redirecting functions/enums that were marked obsolete in 1.53 (December 2017): - ShowTestWindow() -> use ShowDemoWindow() diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index c204a652b93b..a43205c8c24e 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -7498,8 +7498,8 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlag ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - IM_ASSERT(columns_count >= 1 && columns_count <= 64); // Maximum 64 columns - IM_ASSERT(window->DC.CurrentColumns == NULL); // Nested columns are currently not supported + IM_ASSERT(columns_count >= 1); + IM_ASSERT(window->DC.CurrentColumns == NULL); // Nested columns are currently not supported // Acquire storage for the columns set ImGuiID id = GetColumnsID(str_id, columns_count);