Skip to content

Commit 6ab5fd1

Browse files
committed
Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the next row in such state where subsequent SameLine() would move back to previous row.
1 parent 8731cc2 commit 6ab5fd1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Other Changes:
5656

5757
- InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing
5858
Enter keep the input active and select all text.
59+
- Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the
60+
next row in such state where subsequent SameLine() would move back to previous row.
5961
- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
6062
can apply to mouse data as well. (#4921)
6163
- Nav: Fixed moving/resizing window with gamepad or keyboard when running at very high framerate.

imgui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Index of this file:
6565
// Version
6666
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
6767
#define IMGUI_VERSION "1.89 WIP"
68-
#define IMGUI_VERSION_NUM 18804
68+
#define IMGUI_VERSION_NUM 18805
6969
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
7070
#define IMGUI_HAS_TABLE
7171

imgui_tables.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,8 @@ void ImGui::TableBeginRow(ImGuiTable* table)
17171717
table->RowTextBaseline = 0.0f;
17181718
table->RowIndentOffsetX = window->DC.Indent.x - table->HostIndentX; // Lock indent
17191719
window->DC.PrevLineTextBaseOffset = 0.0f;
1720+
window->DC.CurrLineSize = ImVec2(0.0f, 0.0f);
1721+
window->DC.IsSameLine = false;
17201722
window->DC.CursorMaxPos.y = next_y1;
17211723

17221724
// Making the header BG color non-transparent will allow us to overlay it multiple times when handling smooth dragging.
@@ -3957,6 +3959,7 @@ void ImGui::NextColumn()
39573959
{
39583960
// New row/line: column 0 honor IndentX.
39593961
window->DC.ColumnsOffset.x = ImMax(column_padding - window->WindowPadding.x, 0.0f);
3962+
window->DC.IsSameLine = false;
39603963
columns->LineMinY = columns->LineMaxY;
39613964
}
39623965
window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x);

0 commit comments

Comments
 (0)