RangeSelect/MultiSelect: Fixed ImGuiSelectionBasicStorage::ApplyRequests() incorrectly maintaining selection size on SelectAll.

features/range_select
ocornut ago%!(EXTRA string=1 year)
parent 4fb97db4af
commit c0c5f3dbc7
  1. 2
      imgui_widgets.cpp

@ -7613,7 +7613,7 @@ void ImGuiSelectionBasicStorage::ApplyRequests(ImGuiMultiSelectIO* ms_io, int it
Clear(); Clear();
if (req.Type == ImGuiSelectionRequestType_SelectAll) if (req.Type == ImGuiSelectionRequestType_SelectAll)
{ {
Storage.Data.resize(0); Clear();
Storage.Data.reserve(items_count); Storage.Data.reserve(items_count);
for (int idx = 0; idx < items_count; idx++) for (int idx = 0; idx < items_count; idx++)
AddItem(AdapterIndexToStorageId(this, idx)); AddItem(AdapterIndexToStorageId(this, idx));

Loading…
Cancel
Save