From 466b6e619a1a4fe764e84f2c9131a13eaa2e3f0a Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 13 May 2020 22:24:20 +0200 Subject: [PATCH] Tables: Fixed incorrect application of CursorMaxPos.x (3162) --- imgui_tables.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui_tables.cpp b/imgui_tables.cpp index b585f1141..b6a526e85 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -971,12 +971,12 @@ void ImGui::EndTable() column->ContentWidthHeadersUsed = (ImS16)ImMax(0.0f, column->ContentMaxPosHeadersUsed - ref_x_headers); column->ContentWidthHeadersIdeal = (ImS16)ImMax(0.0f, column->ContentMaxPosHeadersIdeal - ref_x_headers); + // Add an extra 1 pixel so we can see the last column vertical line if it lies on the right-most edge. if (table->ActiveMaskByIndex & ((ImU64)1 << column_n)) - max_pos_x = ImMax(max_pos_x, column->MaxX); + max_pos_x = ImMax(max_pos_x, column->MaxX + 1.0f); } - // Add an extra 1 pixel so we can see the last column vertical line if it lies on the right-most edge. - inner_window->DC.CursorMaxPos.x = max_pos_x + 1; + inner_window->DC.CursorMaxPos.x = max_pos_x; if (!(flags & ImGuiTableFlags_NoClipX)) inner_window->DrawList->PopClipRect();