Merge pull request #467 from simplyWiri/fix-missing-tree-pop

Add missing TreePop in function which is called from inside a TreeNode
This commit is contained in:
Bartosz Taudul 2022-09-10 12:05:05 +02:00 committed by GitHub
commit ad23932e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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