Tables: fixed FrozenColumns issue introduced by 505bc9a.

cc #9312
This commit is contained in:
ocornut
2026-04-01 21:35:55 +02:00
parent bf10275aa7
commit b7bdea3215

View File

@@ -1099,7 +1099,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
// Initial nav layer: using FreezeRowsCount, NOT FreezeRowsRequest, so Header line changes layer when frozen
column->NavLayerCurrent = (ImS8)(table->FreezeRowsCount > 0 ? ImGuiNavLayer_Menu : (ImGuiNavLayer)table->NavLayer);
if (offset_x_frozen && table->FreezeColumnsCount == column_n)
if (offset_x_frozen && table->FreezeColumnsCount == order_n)
{
offset_x += work_rect.Min.x - table->OuterRect.Min.x;
offset_x_frozen = false;
@@ -1219,7 +1219,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
column->CannotSkipItemsQueue >>= 1;
}
if (column_n < table->FreezeColumnsCount)
if (order_n < table->FreezeColumnsCount)
host_clip_rect.Min.x = ImClamp(column->MaxX + TABLE_BORDER_SIZE, host_clip_rect.Min.x, host_clip_rect.Max.x);
offset_x += column->WidthGiven + table->CellSpacingX1 + table->CellSpacingX2 + table->CellPaddingX * 2.0f;