diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 86d9ffdd..f13ee1cd 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -93,6 +93,8 @@ Other changes: (regression from 1.89.2, only happened in some states). (#6783, #6000) - InputTextMultiline: Fixed Tabbing cycle leading to a situation where Enter key wouldn't be accepted by the widget when navigation highlight is visible. (#6802, #3092, #5759, #787) +- BeginGroup(): Fixed a bug pushing line lower extent too far down when called after a call + to SameLine() followed by manual cursor manipulation. - BeginListBox(): Fixed not consuming SetNextWindowXXX data when returning false. - MenuBar: Fixed an issue where layouting an item in the menu-bar would erroneously register contents size in a way that would affect the scrolling layer. diff --git a/imgui.cpp b/imgui.cpp index 835918b4..5dba9bb4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9854,6 +9854,7 @@ void ImGui::BeginGroup() group_data.BackupCurrLineTextBaseOffset = window->DC.CurrLineTextBaseOffset; group_data.BackupActiveIdIsAlive = g.ActiveIdIsAlive; group_data.BackupHoveredIdIsAlive = g.HoveredId != 0; + group_data.BackupIsSameLine = window->DC.IsSameLine; group_data.BackupActiveIdPreviousFrameIsAlive = g.ActiveIdPreviousFrameIsAlive; group_data.EmitItem = true; @@ -9885,6 +9886,7 @@ void ImGui::EndGroup() window->DC.GroupOffset = group_data.BackupGroupOffset; window->DC.CurrLineSize = group_data.BackupCurrLineSize; window->DC.CurrLineTextBaseOffset = group_data.BackupCurrLineTextBaseOffset; + window->DC.IsSameLine = group_data.BackupIsSameLine; if (g.LogEnabled) g.LogLinePosY = -FLT_MAX; // To enforce a carriage return diff --git a/imgui_internal.h b/imgui_internal.h index 04c667bb..99c41a0a 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1071,6 +1071,7 @@ struct IMGUI_API ImGuiGroupData ImGuiID BackupActiveIdIsAlive; bool BackupActiveIdPreviousFrameIsAlive; bool BackupHoveredIdIsAlive; + bool BackupIsSameLine; bool EmitItem; };