From d61e8a311fddc8b4fba1278a0fb47386c351e44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sun, 7 Nov 2021 21:30:24 -0800 Subject: [PATCH] Fixed build. --- tools/geometryv/geometryv.cpp | 10 +++++----- tools/texturev/texturev.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/geometryv/geometryv.cpp b/tools/geometryv/geometryv.cpp index 40929126e..f38a0e422 100644 --- a/tools/geometryv/geometryv.cpp +++ b/tools/geometryv/geometryv.cpp @@ -1075,8 +1075,11 @@ int _main_(int _argc, char** _argv) { const int32_t itemCount = int32_t(view.m_fileList.size() ); - int32_t start, end; - ImGui::CalcListClipping(itemCount, itemHeight, &start, &end); + ImGuiListClipper clipper; + clipper.Begin(itemCount, itemHeight); + + int32_t start = clipper.DisplayStart; + int32_t end = clipper.DisplayEnd; const int32_t index = int32_t(view.m_fileIndex); if (index <= start) @@ -1088,9 +1091,6 @@ int _main_(int _argc, char** _argv) ImGui::SetScrollY(ImGui::GetScrollY() + (index-end+1)*itemHeight); } - ImGuiListClipper clipper; - clipper.Begin(itemCount, itemHeight); - while (clipper.Step() ) { for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos) diff --git a/tools/texturev/texturev.cpp b/tools/texturev/texturev.cpp index c4043273e..12e257b6a 100644 --- a/tools/texturev/texturev.cpp +++ b/tools/texturev/texturev.cpp @@ -1861,8 +1861,11 @@ int _main_(int _argc, char** _argv) { const int32_t itemCount = int32_t(view.m_fileList.size() ); - int32_t start, end; - ImGui::CalcListClipping(itemCount, itemHeight, &start, &end); + ImGuiListClipper clipper; + clipper.Begin(itemCount, itemHeight); + + int32_t start = clipper.DisplayStart; + int32_t end = clipper.DisplayEnd; const int32_t index = int32_t(view.m_fileIndex); if (index <= start) @@ -1874,9 +1877,6 @@ int _main_(int _argc, char** _argv) ImGui::SetScrollY(ImGui::GetScrollY() + (index-end+1)*itemHeight); } - ImGuiListClipper clipper; - clipper.Begin(itemCount, itemHeight); - while (clipper.Step() ) { for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)