Clip found zones list.

This commit is contained in:
Bartosz Taudul 2020-01-31 19:07:20 +01:00
parent f86fbe7fd5
commit a84eec1aef

View File

@ -9573,8 +9573,12 @@ void View::DrawZoneList( const Vector<short_ptr<ZoneEvent>>& zones )
}
}
for( auto& ev : *zonesToIterate )
ImGuiListClipper clipper( zonesToIterate->size() );
while( clipper.Step() )
{
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
{
auto ev = (*zonesToIterate)[i].get();
const auto end = m_worker.GetZoneEndDirect( *ev );
int64_t timespan;
if( m_findZone.runningTime )
@ -9621,6 +9625,7 @@ void View::DrawZoneList( const Vector<short_ptr<ZoneEvent>>& zones )
if( m_zoneHover == ev ) ImGui::PopStyleColor();
ImGui::PopID();
}
}
ImGui::Columns( 1 );
ImGui::Separator();
ImGui::TreePop();