mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
MultiSelect: added ImGuiSelectionBasicStorage::GetStorageIdFromIndex() indirection to be easier on the reader.
Tempting to make it a virtual.
This commit is contained in:
parent
ab995d3d4f
commit
c94cf6f01f
3 changed files with 9 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue