|
@@ -10686,11 +10686,11 @@ void ImGui::EndGroup()
|
|
|
if (window->DC.IsSetPos)
|
|
|
ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
|
|
|
|
|
- ImRect group_bb(group_data.BackupCursorPos, ImMax(window->DC.CursorMaxPos, group_data.BackupCursorPos));
|
|
|
-
|
|
|
+ // Include LastItemData.Rect.Max as a workaround for e.g. EndTable() undershooting with CursorMaxPos report. (#7543)
|
|
|
+ ImRect group_bb(group_data.BackupCursorPos, ImMax(ImMax(window->DC.CursorMaxPos, g.LastItemData.Rect.Max), group_data.BackupCursorPos));
|
|
|
window->DC.CursorPos = group_data.BackupCursorPos;
|
|
|
window->DC.CursorPosPrevLine = group_data.BackupCursorPosPrevLine;
|
|
|
- window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos);
|
|
|
+ window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, group_bb.Max);
|
|
|
window->DC.Indent = group_data.BackupIndent;
|
|
|
window->DC.GroupOffset = group_data.BackupGroupOffset;
|
|
|
window->DC.CurrLineSize = group_data.BackupCurrLineSize;
|
|
@@ -10705,7 +10705,7 @@ void ImGui::EndGroup()
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- window->DC.CurrLineTextBaseOffset = ImMax(window->DC.PrevLineTextBaseOffset, group_data.BackupCurrLineTextBaseOffset); // FIXME: Incorrect, we should grab the base offset from the *first line* of the group but it is hard to obtain now.
|
|
|
+ window->DC.CurrLineTextBaseOffset = ImMax(window->DC.PrevLineTextBaseOffset, group_data.BackupCurrLineTextBaseOffset); // FIXME: Incorrect, we should grab the base offset from the *first line* of the group but it is hard to obtain now.
|
|
|
ItemSize(group_bb.GetSize());
|
|
|
ItemAdd(group_bb, 0, NULL, ImGuiItemFlags_NoTabStop);
|
|
|
|