Add missing TreePop in function which is called from inside a TreeNode

This commit is contained in:
simplyWiri 2022-09-10 17:09:04 +10:00
parent ae0fe3cc93
commit 830e7162eb

View File

@ -75,7 +75,11 @@ void View::DrawZoneList( int id, const Vector<short_ptr<ZoneEvent>>& zones )
const auto zsz = zones.size();
char buf[32];
sprintf( buf, "%i##zonelist", id );
if( !ImGui::BeginTable( buf, 3, ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Resizable | ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_Sortable | ImGuiTableFlags_ScrollY, ImVec2( 0, ImGui::GetTextLineHeightWithSpacing() * std::min<size_t>( zsz + 1, 15 ) ) ) ) return;
if( !ImGui::BeginTable( buf, 3, ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Resizable | ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_Sortable | ImGuiTableFlags_ScrollY, ImVec2( 0, ImGui::GetTextLineHeightWithSpacing() * std::min<size_t>( zsz + 1, 15 ) ) ) )
{
ImGui::TreePop();
return;
}
ImGui::TableSetupScrollFreeze( 0, 1 );
ImGui::TableSetupColumn( "Time from start" );
ImGui::TableSetupColumn( "Execution time", ImGuiTableColumnFlags_PreferSortDescending );