Fixed bounding measurement of empty groups (fix #162)
This commit is contained in:
parent
e14c7e5510
commit
bc88ed0cb9
@ -6866,7 +6866,8 @@ void ImGui::EndGroup()
|
||||
ImGuiGroupData& group_data = window->DC.GroupStack.back();
|
||||
|
||||
ImRect group_bb(group_data.BackupCursorPos, window->DC.CursorMaxPos);
|
||||
group_bb.Max.y -= style.ItemSpacing.y;
|
||||
group_bb.Max.y -= style.ItemSpacing.y; // Cancel out last vertical spacing because we are adding one ourselves.
|
||||
group_bb.Max = ImMax(group_bb.Min, group_bb.Max);
|
||||
|
||||
window->DC.CursorPos = group_data.BackupCursorPos;
|
||||
window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos);
|
||||
|
Loading…
Reference in New Issue
Block a user