Fixed build.

This commit is contained in:
Бранимир Караџић 2021-11-07 21:30:24 -08:00
parent eb5c4ed229
commit d61e8a311f
2 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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)