mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Pressing Z will temporarily switch child calls.
This commit is contained in:
parent
e189f596ac
commit
0bbda5ea11
@ -1118,18 +1118,22 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
||||
GatherAdditionalIpStats( m_symAddr, iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view );
|
||||
iptotalSrc = iptotalAsm;
|
||||
}
|
||||
const auto slzReady = worker.AreSourceLocationZonesReady();
|
||||
if( ( iptotalAsm.local + iptotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
const auto slzReady = worker.AreSourceLocationZonesReady();
|
||||
if( !slzReady )
|
||||
{
|
||||
ImGui::PushItemFlag( ImGuiItemFlags_Disabled, true );
|
||||
ImGui::PushStyleVar( ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f );
|
||||
m_childCalls = false;
|
||||
}
|
||||
else if( ImGui::IsKeyDown( 'Z' ) )
|
||||
{
|
||||
m_childCalls = !m_childCalls;
|
||||
}
|
||||
SmallCheckbox( ICON_FA_SIGN_OUT_ALT " Child calls", &m_childCalls );
|
||||
if( !slzReady )
|
||||
{
|
||||
@ -1142,6 +1146,15 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted( "Press Z key to temporarily reverse selection." );
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
@ -1238,6 +1251,8 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
||||
break;
|
||||
}
|
||||
|
||||
if( slzReady && ImGui::IsKeyDown( 'Z' ) ) m_childCalls = !m_childCalls;
|
||||
|
||||
if( jumpOut != 0 )
|
||||
{
|
||||
auto sym = worker.GetSymbolData( jumpOut );
|
||||
|
Loading…
Reference in New Issue
Block a user