File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -1075,8 +1075,11 @@ int _main_(int _argc, char** _argv)
1075
1075
{
1076
1076
const int32_t itemCount = int32_t (view.m_fileList .size () );
1077
1077
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 ;
1080
1083
1081
1084
const int32_t index = int32_t (view.m_fileIndex );
1082
1085
if (index <= start)
@@ -1088,9 +1091,6 @@ int _main_(int _argc, char** _argv)
1088
1091
ImGui::SetScrollY (ImGui::GetScrollY () + (index -end+1 )*itemHeight);
1089
1092
}
1090
1093
1091
- ImGuiListClipper clipper;
1092
- clipper.Begin (itemCount, itemHeight);
1093
-
1094
1094
while (clipper.Step () )
1095
1095
{
1096
1096
for (int32_t pos = clipper.DisplayStart ; pos < clipper.DisplayEnd ; ++pos)
Original file line number Diff line number Diff line change @@ -1861,8 +1861,11 @@ int _main_(int _argc, char** _argv)
1861
1861
{
1862
1862
const int32_t itemCount = int32_t (view.m_fileList .size () );
1863
1863
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 ;
1866
1869
1867
1870
const int32_t index = int32_t (view.m_fileIndex );
1868
1871
if (index <= start)
@@ -1874,9 +1877,6 @@ int _main_(int _argc, char** _argv)
1874
1877
ImGui::SetScrollY (ImGui::GetScrollY () + (index -end+1 )*itemHeight);
1875
1878
}
1876
1879
1877
- ImGuiListClipper clipper;
1878
- clipper.Begin (itemCount, itemHeight);
1879
-
1880
1880
while (clipper.Step () )
1881
1881
{
1882
1882
for (int32_t pos = clipper.DisplayStart ; pos < clipper.DisplayEnd ; ++pos)
You can’t perform that action at this time.
0 commit comments