mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-21 09:21:59 +00:00
MultiSelect: Added IMGUI_HAS_MULTI_SELECT define. Fixed right-click toggling selection without clearing active id, could lead to MarkItemEdited() asserting. Fixed demo.
This commit is contained in:
@@ -7258,7 +7258,9 @@ void ImGui::MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed)
|
||||
bool hovered = IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup);
|
||||
if (hovered && IsMouseClicked(1))
|
||||
{
|
||||
SetFocusID(g.LastItemData.ID, window);
|
||||
if (g.ActiveId != 0 && g.ActiveId != id)
|
||||
ClearActiveID();
|
||||
SetFocusID(id, window);
|
||||
if (!pressed && !selected)
|
||||
{
|
||||
pressed = true;
|
||||
|
Reference in New Issue
Block a user