| 3194 | } |
| 3195 | |
| 3196 | void ImGuiListClipper::End() |
| 3197 | { |
| 3198 | if (ImGuiListClipperData* data = (ImGuiListClipperData*)TempData) |
| 3199 | { |
| 3200 | // In theory here we should assert that we are already at the right position, but it seems saner to just seek at the end and not assert/crash the user. |
| 3201 | ImGuiContext& g = *Ctx; |
| 3202 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name); |
| 3203 | if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0) |
| 3204 | SeekCursorForItem(ItemsCount); |
| 3205 | |
| 3206 | // Restore temporary buffer and fix back pointers which may be invalidated when nesting |
| 3207 | IM_ASSERT(data->ListClipper == this); |
| 3208 | data->StepNo = data->Ranges.Size; |
| 3209 | if (--g.ClipperTempDataStacked > 0) |
| 3210 | { |
| 3211 | data = &g.ClipperTempData[g.ClipperTempDataStacked - 1]; |
| 3212 | data->ListClipper->TempData = data; |
| 3213 | } |
| 3214 | TempData = NULL; |
| 3215 | } |
| 3216 | ItemsCount = -1; |
| 3217 | } |
| 3218 | |
| 3219 | void ImGuiListClipper::IncludeItemsByIndex(int item_begin, int item_end) |
| 3220 | { |
no test coverage detected