diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 2841b6e84..a03177441 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -1010,7 +1010,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) } if (visible_n < table->FreezeColumnsCount) - host_clip_rect.Min.x = ImMax(host_clip_rect.Min.x, column->MaxX + TABLE_BORDER_SIZE); + 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; visible_n++; @@ -2344,7 +2344,7 @@ void ImGui::TableMergeDrawChannels(ImGuiTable* table) void ImGui::TableDrawBorders(ImGuiTable* table) { ImGuiWindow* inner_window = table->InnerWindow; - if (inner_window->Hidden || !table->HostClipRect.Overlaps(table->InnerClipRect)) + if (!table->OuterWindow->ClipRect.Overlaps(table->OuterRect)) return; ImDrawList* inner_drawlist = inner_window->DrawList;