Skip to content

Commit

Permalink
Tables: Fixed incorrect application of CursorMaxPos.x (3162)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed May 13, 2020
1 parent 738b911 commit 9d0789d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8736,12 +8736,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();
Expand Down

0 comments on commit 9d0789d

Please sign in to comment.