| 2706 | } |
| 2707 | |
| 2708 | void ImGuiListClipper::End() |
| 2709 | { |
| 2710 | ImGuiContext& g = *GImGui; |
| 2711 | if (ImGuiListClipperData* data = (ImGuiListClipperData*)TempData) |
| 2712 | { |
| 2713 | // 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. |
| 2714 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name); |
| 2715 | if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0) |
| 2716 | ImGuiListClipper_SeekCursorForItem(this, ItemsCount); |
| 2717 | |
| 2718 | // Restore temporary buffer and fix back pointers which may be invalidated when nesting |
| 2719 | IM_ASSERT(data->ListClipper == this); |
| 2720 | data->StepNo = data->Ranges.Size; |
| 2721 | if (--g.ClipperTempDataStacked > 0) |
| 2722 | { |
| 2723 | data = &g.ClipperTempData[g.ClipperTempDataStacked - 1]; |
| 2724 | data->ListClipper->TempData = data; |
| 2725 | } |
| 2726 | TempData = NULL; |
| 2727 | } |
| 2728 | ItemsCount = -1; |
| 2729 | } |
| 2730 | |
| 2731 | void ImGuiListClipper::ForceDisplayRangeByIndices(int item_min, int item_max) |
| 2732 | { |
nothing calls this directly
no test coverage detected