Mulit-Select: Box-Select: fixed an issue using in a table while relying on the TableNextColumn() return value to perform coarse clipping. (#7994)

This is presumably not sufficient as MultiSelectAddSetRange() is also deficient there.
This commit is contained in:
ocornut
2026-04-09 22:48:52 +02:00
parent f08b33fd0c
commit 6ce4b44547
2 changed files with 8 additions and 1 deletions

View File

@@ -63,7 +63,10 @@ Other Changes:
items out of view wouldn't be properly selected while scrolling while mouse cursor
is hovering outside of selection scope. (#7994, #1861, #6518)
- Box-Select: fixed an issue where items out of horizontal view would sometimes lead
to incorrect merging of sequential selection requests. (#7994, #1861, #6518)
to incorrect merging of sequential selection requests while also scrolling fast
enough to overlap multiple rows during a frame. (#7994, #1861, #6518)
- Box-Select: fixed an issue using ImGuiMultiSelectFlags_BoxSelect2d mode in a Table
while relying on the TableNextColumn() return value to perform coarse clipping. (#7994)
- Fonts:
- imgui_freetype: add FreeType headers & compiled version in 'About Dear ImGui' details.
- Clipper:

View File

@@ -1152,6 +1152,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
column->ClipRect.Min.y = work_rect.Min.y;
column->ClipRect.Max.x = column->MaxX; //column->WorkMaxX;
column->ClipRect.Max.y = FLT_MAX;
ImRect clip_rect_unclipped = column->ClipRect;
column->ClipRect.ClipWithFull(host_clip_rect);
// Mark column as Clipped (not in sight)
@@ -1169,6 +1170,9 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
// Mark column as requesting output from user. Note that fixed + non-resizable sets are auto-fitting at all times and therefore always request output.
column->IsRequestOutput = is_visible || column->AutoFitQueue != 0 || column->CannotSkipItemsQueue != 0;
ImGuiBoxSelectState* bs = &g.BoxSelectState;
if (!column->IsRequestOutput && bs->UnclipMode && bs->UnclipRect.Overlaps(clip_rect_unclipped))
column->IsRequestOutput = true;
// Mark column as SkipItems (ignoring all items/layout)
// (table->HostSkipItems is a copy of inner_window->SkipItems before we cleared it above in Part 2)