Skip to content

Commit 237165a

Browse files
committed
MultiSelect: fixed an issue caused by previous commit.
Amend a285835. Breaks box-select.
1 parent a285835 commit 237165a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

imgui_widgets.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -7424,7 +7424,11 @@ ImGuiMultiSelectIO* ImGui::BeginMultiSelect(ImGuiMultiSelectFlags flags, int sel
74247424
}
74257425

74267426
if (request_clear || request_select_all)
7427+
{
74277428
MultiSelectAddSetAll(ms, request_select_all);
7429+
if (!request_select_all)
7430+
storage->LastSelectionSize = 0;
7431+
}
74287432
ms->LoopRequestSetAll = request_select_all ? 1 : request_clear ? 0 : -1;
74297433
ms->LastSubmittedItem = ImGuiSelectionUserData_Invalid;
74307434

@@ -7810,8 +7814,6 @@ void ImGui::MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected)
78107814
ImGuiSelectionRequest req = { ImGuiSelectionRequestType_SetAll, selected, 0, ImGuiSelectionUserData_Invalid, ImGuiSelectionUserData_Invalid };
78117815
ms->IO.Requests.resize(0); // Can always clear previous requests
78127816
ms->IO.Requests.push_back(req); // Add new request
7813-
if (selected == false)
7814-
ms->Storage->LastSelectionSize = 0;
78157817
}
78167818

78177819
void ImGui::MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item)

0 commit comments

Comments
 (0)