1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-09-23 19:18:34 +02:00

Tables: fixed assertion related to inconsistent outer clipping when sizes are not rounded. (#7957)

This commit is contained in:
ocornut 2024-09-17 18:09:02 +02:00
parent 11fba027e5
commit 71714eab53
3 changed files with 4 additions and 3 deletions

View File

@ -70,7 +70,8 @@ Other changes:
(e.g. in our testing, handling of a 1 MB text buffer is now 3 times faster in VS2022 Debug build).
This is the first step toward more refactoring. (#7925) [@alektron, @ocornut]
- InputText: added CJK double-width punctuation to list of separators considered for CTRL+Arrow.
- Tables: fixes an assertion with tables with borders when clipped by parent. (#6765, #3752, #7428)
- Tables: fixed assertion related to inconsistent outer clipping when sizes are not rounded. (#7957) [@eclbtownsend]
- Tables: fixed assertion with tables with borders when clipped by parent. (#6765, #3752, #7428)
- Misc: Made it accepted to call SetMouseCursor() with any out-of-bound value, as a way to allow
hacking in custom cursors if desirable.
- Fonts: fixed ellipsis "..." rendering width miscalculation bug introduced in 1.91.0. (#7976) [@DDeimos]

View File

@ -29,7 +29,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.91.2 WIP"
#define IMGUI_VERSION_NUM 19114
#define IMGUI_VERSION_NUM 19115
#define IMGUI_HAS_TABLE
/*

View File

@ -328,7 +328,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
// - always performing the GetOrAddByKey() O(log N) query in g.Tables.Map[].
const bool use_child_window = (flags & (ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY)) != 0;
const ImVec2 avail_size = GetContentRegionAvail();
const ImVec2 actual_outer_size = CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f);
const ImVec2 actual_outer_size = ImTrunc(CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f));
const ImRect outer_rect(outer_window->DC.CursorPos, outer_window->DC.CursorPos + actual_outer_size);
const bool outer_window_is_measuring_size = (outer_window->AutoFitFramesX > 0) || (outer_window->AutoFitFramesY > 0); // Doesn't apply to AlwaysAutoResize windows!
if (use_child_window && IsClippedEx(outer_rect, 0) && !outer_window_is_measuring_size)