From 9a93fb57160beccb79603e6e48343ca6c47b1ae3 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 4 Sep 2023 11:55:32 +0200 Subject: [PATCH] Tables: Fixed support for cross-cell SameLine() by preserving Line Y1 position. Amend 8f5ce73. --- imgui_tables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_tables.cpp b/imgui_tables.cpp index e029585c..1e938cec 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -2017,7 +2017,7 @@ void ImGui::TableBeginCell(ImGuiTable* table, int column_n) window->DC.CursorPos.y = table->RowPosY1 + table->CellPaddingY; window->DC.CursorMaxPos.x = window->DC.CursorPos.x; window->DC.ColumnsOffset.x = start_x - window->Pos.x - window->DC.Indent.x; // FIXME-WORKRECT - window->DC.CursorPosPrevLine = window->DC.CursorPos; // This allows users to call SameLine() to share LineSize between columns. + window->DC.CursorPosPrevLine.x = window->DC.CursorPos.x; // PrevLine.y is preserved. This allows users to call SameLine() to share LineSize between columns. window->DC.CurrLineTextBaseOffset = table->RowTextBaseline; window->DC.NavLayerCurrent = (ImGuiNavLayer)column->NavLayerCurrent;