mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Only display zone "statistics" button if data is available.
This commit is contained in:
parent
f4fdd0221b
commit
443771ecff
@ -5707,15 +5707,25 @@ void View::DrawZoneInfoWindow()
|
|||||||
ShowZoneInfo( *parent );
|
ShowZoneInfo( *parent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
#ifndef TRACY_NO_STATISTICS
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
if( m_worker.AreSourceLocationZonesReady() )
|
||||||
if( ImGui::Button( ICON_FA_CHART_BAR " Statistics" ) )
|
|
||||||
#else
|
|
||||||
if( ImGui::Button( "Statistics" ) )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
m_findZone.ShowZone( ev.SrcLoc(), m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) );
|
const auto sl = ev.SrcLoc();
|
||||||
|
const auto& slz = m_worker.GetZonesForSourceLocation( sl );
|
||||||
|
if( !slz.zones.empty() )
|
||||||
|
{
|
||||||
|
ImGui::SameLine();
|
||||||
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
|
if( ImGui::Button( ICON_FA_CHART_BAR " Statistics" ) )
|
||||||
|
#else
|
||||||
|
if( ImGui::Button( "Statistics" ) )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
m_findZone.ShowZone( sl, m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if( ev.callstack.Val() != 0 )
|
if( ev.callstack.Val() != 0 )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user