mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +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:
parent
8947c35fa1
commit
57da88093f
3 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue