BeginGroup(): Fixed a bug pushing line lower extent too far down when called after a call to SameLine() followed by manual cursor manipulation.

features/potocpav-newer-lines-2
ocornut ago%!(EXTRA string=2 years)
parent 8175a47881
commit 9ece0bdc02
  1. 2
      docs/CHANGELOG.txt
  2. 2
      imgui.cpp
  3. 1
      imgui_internal.h

@ -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.

@ -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

@ -1071,6 +1071,7 @@ struct IMGUI_API ImGuiGroupData
ImGuiID BackupActiveIdIsAlive;
bool BackupActiveIdPreviousFrameIsAlive;
bool BackupHoveredIdIsAlive;
bool BackupIsSameLine;
bool EmitItem;
};

Loading…
Cancel
Save