mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-18 12:25:36 +00:00
Groups: fixed an issue reporting IsItemEdited() signal after EndGroup() for some widgets e.g. Checkbox(), Selectable(). (#9028)
This commit is contained in:
@@ -56,6 +56,10 @@ Other Changes:
|
|||||||
- MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick to disable default
|
- MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick to disable default
|
||||||
right-click processing, which selects item on mouse down and is designed for
|
right-click processing, which selects item on mouse down and is designed for
|
||||||
context-menus. (#8200, #9015)
|
context-menus. (#8200, #9015)
|
||||||
|
- Groups: fixed an issue reporting IsItemEdited() signal after EndGroup() when
|
||||||
|
triggered by some widgets e.g. Checkbox(), Selectable() and many others, which
|
||||||
|
cleared ActiveId at the same time as editing. (#9028)
|
||||||
|
Note that IsItemDeactivatedAfterEdit() was not affected, only IsItemEdited).
|
||||||
- Backends:
|
- Backends:
|
||||||
- GLFW: fixed building on Linux platforms where Wayland headers
|
- GLFW: fixed building on Linux platforms where Wayland headers
|
||||||
are not available. (#9024, #8969, #8921, #8920) [@jagot]
|
are not available. (#9024, #8969, #8921, #8920) [@jagot]
|
||||||
|
|||||||
@@ -11518,6 +11518,7 @@ void ImGui::BeginGroup()
|
|||||||
group_data.BackupActiveIdIsAlive = g.ActiveIdIsAlive;
|
group_data.BackupActiveIdIsAlive = g.ActiveIdIsAlive;
|
||||||
group_data.BackupHoveredIdIsAlive = g.HoveredId != 0;
|
group_data.BackupHoveredIdIsAlive = g.HoveredId != 0;
|
||||||
group_data.BackupIsSameLine = window->DC.IsSameLine;
|
group_data.BackupIsSameLine = window->DC.IsSameLine;
|
||||||
|
group_data.BackupActiveIdHasBeenEditedThisFrame = g.ActiveIdHasBeenEditedThisFrame;
|
||||||
group_data.BackupDeactivatedIdIsAlive = g.DeactivatedItemData.IsAlive;
|
group_data.BackupDeactivatedIdIsAlive = g.DeactivatedItemData.IsAlive;
|
||||||
group_data.EmitItem = true;
|
group_data.EmitItem = true;
|
||||||
|
|
||||||
@@ -11582,7 +11583,7 @@ void ImGui::EndGroup()
|
|||||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
|
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
|
||||||
|
|
||||||
// Forward Edited flag
|
// Forward Edited flag
|
||||||
if (group_contains_curr_active_id && g.ActiveIdHasBeenEditedThisFrame)
|
if (g.ActiveIdHasBeenEditedThisFrame && !group_data.BackupActiveIdHasBeenEditedThisFrame)
|
||||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Edited;
|
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Edited;
|
||||||
|
|
||||||
// Forward Deactivated flag
|
// Forward Deactivated flag
|
||||||
|
|||||||
2
imgui.h
2
imgui.h
@@ -29,7 +29,7 @@
|
|||||||
// Library Version
|
// Library Version
|
||||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||||
#define IMGUI_VERSION "1.92.5 WIP"
|
#define IMGUI_VERSION "1.92.5 WIP"
|
||||||
#define IMGUI_VERSION_NUM 19241
|
#define IMGUI_VERSION_NUM 19242
|
||||||
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
|
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
|
||||||
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
|
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
|
||||||
|
|
||||||
|
|||||||
@@ -1173,6 +1173,7 @@ struct IMGUI_API ImGuiGroupData
|
|||||||
ImVec2 BackupCurrLineSize;
|
ImVec2 BackupCurrLineSize;
|
||||||
float BackupCurrLineTextBaseOffset;
|
float BackupCurrLineTextBaseOffset;
|
||||||
ImGuiID BackupActiveIdIsAlive;
|
ImGuiID BackupActiveIdIsAlive;
|
||||||
|
bool BackupActiveIdHasBeenEditedThisFrame;
|
||||||
bool BackupDeactivatedIdIsAlive;
|
bool BackupDeactivatedIdIsAlive;
|
||||||
bool BackupHoveredIdIsAlive;
|
bool BackupHoveredIdIsAlive;
|
||||||
bool BackupIsSameLine;
|
bool BackupIsSameLine;
|
||||||
|
|||||||
Reference in New Issue
Block a user