Skip to content

Commit d61e8a3

Browse files
committed
Fixed build.
1 parent eb5c4ed commit d61e8a3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tools/geometryv/geometryv.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,11 @@ int _main_(int _argc, char** _argv)
10751075
{
10761076
const int32_t itemCount = int32_t(view.m_fileList.size() );
10771077

1078-
int32_t start, end;
1079-
ImGui::CalcListClipping(itemCount, itemHeight, &start, &end);
1078+
ImGuiListClipper clipper;
1079+
clipper.Begin(itemCount, itemHeight);
1080+
1081+
int32_t start = clipper.DisplayStart;
1082+
int32_t end = clipper.DisplayEnd;
10801083

10811084
const int32_t index = int32_t(view.m_fileIndex);
10821085
if (index <= start)
@@ -1088,9 +1091,6 @@ int _main_(int _argc, char** _argv)
10881091
ImGui::SetScrollY(ImGui::GetScrollY() + (index-end+1)*itemHeight);
10891092
}
10901093

1091-
ImGuiListClipper clipper;
1092-
clipper.Begin(itemCount, itemHeight);
1093-
10941094
while (clipper.Step() )
10951095
{
10961096
for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)

tools/texturev/texturev.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1861,8 +1861,11 @@ int _main_(int _argc, char** _argv)
18611861
{
18621862
const int32_t itemCount = int32_t(view.m_fileList.size() );
18631863

1864-
int32_t start, end;
1865-
ImGui::CalcListClipping(itemCount, itemHeight, &start, &end);
1864+
ImGuiListClipper clipper;
1865+
clipper.Begin(itemCount, itemHeight);
1866+
1867+
int32_t start = clipper.DisplayStart;
1868+
int32_t end = clipper.DisplayEnd;
18661869

18671870
const int32_t index = int32_t(view.m_fileIndex);
18681871
if (index <= start)
@@ -1874,9 +1877,6 @@ int _main_(int _argc, char** _argv)
18741877
ImGui::SetScrollY(ImGui::GetScrollY() + (index-end+1)*itemHeight);
18751878
}
18761879

1877-
ImGuiListClipper clipper;
1878-
clipper.Begin(itemCount, itemHeight);
1879-
18801880
while (clipper.Step() )
18811881
{
18821882
for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos)

0 commit comments

Comments
 (0)