From 6c4bf8e56eca5900b925aed1c57ca4179c450482 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 21 Dec 2023 14:29:01 +0100 Subject: [PATCH] MultiSelect: Fixed ImGuiSelectionBasicStorage::ApplyRequests() incorrectly maintaining selection size on SelectAll. --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index f9dfa143..05ced948 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -7730,7 +7730,7 @@ void ImGuiSelectionBasicStorage::ApplyRequests(ImGuiMultiSelectIO* ms_io, int it Clear(); if (req.Type == ImGuiSelectionRequestType_SelectAll) { - Storage.Data.resize(0); + Clear(); Storage.Data.reserve(items_count); for (int idx = 0; idx < items_count; idx++) AddItem(AdapterIndexToStorageId(this, idx));