mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Groups: fixed an issue reporting IsItemEdited() signal after EndGroup() for some widgets e.g. Checkbox(), Selectable(). (#9028)
This commit is contained in:
parent
bc5da9b367
commit
b8573a7e33
4 changed files with 8 additions and 2 deletions
|
|
@ -11518,6 +11518,7 @@ void ImGui::BeginGroup()
|
|||
group_data.BackupActiveIdIsAlive = g.ActiveIdIsAlive;
|
||||
group_data.BackupHoveredIdIsAlive = g.HoveredId != 0;
|
||||
group_data.BackupIsSameLine = window->DC.IsSameLine;
|
||||
group_data.BackupActiveIdHasBeenEditedThisFrame = g.ActiveIdHasBeenEditedThisFrame;
|
||||
group_data.BackupDeactivatedIdIsAlive = g.DeactivatedItemData.IsAlive;
|
||||
group_data.EmitItem = true;
|
||||
|
||||
|
|
@ -11582,7 +11583,7 @@ void ImGui::EndGroup()
|
|||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
|
||||
|
||||
// Forward Edited flag
|
||||
if (group_contains_curr_active_id && g.ActiveIdHasBeenEditedThisFrame)
|
||||
if (g.ActiveIdHasBeenEditedThisFrame && !group_data.BackupActiveIdHasBeenEditedThisFrame)
|
||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Edited;
|
||||
|
||||
// Forward Deactivated flag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue