mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-21 09:21:59 +00:00
MultiSelect: added ImGuiSelectionBasicStorage::GetStorageIdFromIndex() indirection to be easier on the reader.
Tempting to make it a virtual.
This commit is contained in:
@@ -7846,11 +7846,11 @@ void ImGuiSelectionBasicStorage::ApplyRequests(ImGuiMultiSelectIO* ms_io)
|
||||
{
|
||||
Storage.Data.reserve(ms_io->ItemsCount);
|
||||
for (int idx = 0; idx < ms_io->ItemsCount; idx++)
|
||||
SetItemSelected(AdapterIndexToStorageId(this, idx), true);
|
||||
SetItemSelected(GetStorageIdFromIndex(idx), true);
|
||||
}
|
||||
if (req.Type == ImGuiSelectionRequestType_SetRange)
|
||||
for (int idx = (int)req.RangeFirstItem; idx <= (int)req.RangeLastItem; idx++)
|
||||
SetItemSelected(AdapterIndexToStorageId(this, idx), req.Selected);
|
||||
SetItemSelected(GetStorageIdFromIndex(idx), req.Selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user