| 2768 | } |
| 2769 | |
| 2770 | void ImGuiListClipper::End() |
| 2771 | { |
| 2772 | ImGuiContext& g = *GImGui; |
| 2773 | if (ImGuiListClipperData* data = (ImGuiListClipperData*)TempData) |
| 2774 | { |
| 2775 | // 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. |
| 2776 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name); |
| 2777 | if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0) |
| 2778 | ImGuiListClipper_SeekCursorForItem(this, ItemsCount); |
| 2779 | |
| 2780 | // Restore temporary buffer and fix back pointers which may be invalidated when nesting |
| 2781 | IM_ASSERT(data->ListClipper == this); |
| 2782 | data->StepNo = data->Ranges.Size; |
| 2783 | if (--g.ClipperTempDataStacked > 0) |
| 2784 | { |
| 2785 | data = &g.ClipperTempData[g.ClipperTempDataStacked - 1]; |
| 2786 | data->ListClipper->TempData = data; |
| 2787 | } |
| 2788 | TempData = NULL; |
| 2789 | } |
| 2790 | ItemsCount = -1; |
| 2791 | } |
| 2792 | |
| 2793 | void ImGuiListClipper::ForceDisplayRangeByIndices(int item_min, int item_max) |
| 2794 | { |
no test coverage detected